Cannot write to directory /etc/webmin/virtual-server/

14 posts / 0 new
Last post
#1 Mon, 12/14/2009 - 15:35

Cannot write to directory /etc/webmin/virtual-server/

I'm trying to set up server templates, the default template for Directives and settings for new websites and I get this error.

As far as I can tell that directory exists as it should, I've even tried giving it 777 permissions so anything can write to it just so I can get past this step. What else could cause it to fail to write? Does virtualmin keep an error log somewhere that I can get a more verbose message?

I'm no novice to linux admin, but I don't know where to look for what virtualmin is failing on here. I could make all my virtualhost entries manually but that's kind of counter to the point.

running Virtualmin 3.75 gpl on Debian Lenny.

Mon, 12/14/2009 - 17:04

Hmm, I've never seen Virtualmin have problems writing to that dir. Virtualmin runs as root, so it in theory should have permission to write anywhere it likes.

I suppose my two questions are:

  1. How did you go about installing it? Had you used the script?

  2. Are you using something like SELinux on your server?

Regarding logs -- you can take a peek in /var/webmin/miniserv.error, that may have some further info in it.


Mon, 12/14/2009 - 18:20

I did run to get it installed. I notice I didn't have default templates for domains like some people have mentioned having.

Unfortunately all I've got in miniserv.error is:

Error: Cannot write to directory /etc/webmin/virtual-server/

I have not isntalled SELinux, but I went ahead and put selinux=0 in my grub config and rebooted just to be sure.

Wed, 01/13/2010 - 01:48

I received the same error when installing via the script, on a fresh install of Ubuntu 8.04 LTS (64bit).

Initially, it threw a proftpd error. After I installed it manually, via apt-get, I received these errors.

Here's what I tried to get it working:

  1. I did a mkdir to create the "virtual-server" folder and touch to create the missing config file.

  2. After doing the above, I received the following errors: "Missing file to read at webalizer::/usr/share/webmin/webalizer/ line 50" and "Error: flush_file_lines called on non-loaded file /etc/webalizer.conf"

  3. Copied /etc/webalizer/webalizer.conf to /etc/webalizer.conf

This let it install without errors, but I couldn't access virtualmin via the Internet, and rebooting the server resulted in me getting a "connection refused" from SSH. I'm guessing something was screwed in the iptables install.

I'll try again after a reload.

Wed, 01/13/2010 - 07:50

It's really odd that you'd see those errors after a fresh install.

How much RAM do you have? And are you by chance using a VPS of some kind?


Wed, 01/13/2010 - 09:12

4GB of ram. No VPS.

Server Stats:

Ubuntu 8.04 LTS C2Quad processor 4GB ram

The only thing I did, prior to trying to install Virtualmin was do an apt-get update, and apt-get upgrade. I neglected to mention that I was able to access Usermin after it completed the install, and "service webmin restart/start/stop" seemed to work, but going to "https://domain:10000" failed.

I tried "service virtualmin start/restart" as well, but get an error to the effect of "service does not exist". There also wasn't a "virtualmin" folder in "/etc/webmin". I've never paid attention before, so I don't know if there was supposed to be one there.

Thu, 01/14/2010 - 10:23

I just tried the script again, and received the same problems. Again, it's a fresh install of Ubuntu 8.04 LTS (64 bit).

Webmin was installed on port 2536, and going to the https://myserver:2536 gave me the webmin login page, but none of my accounts were able to log in. I created a new account and tried it, but it resulted in Webmin denying my IP address.

Apt-get also tries to install virtualmin (and dependencies), each time I run it for an unrelated package.

I'm going to try to reload it on my own, using a network (remote) reinstall, instead of my hosts "reload" feature. I didn't have luck with this the last time I tried it, but I guess it won't hurt now.

I've attached the log file from my attempted install. (with domain information removed)

(modified file to removed my domain info)

Thu, 01/14/2010 - 09:23

Hrm, the trouble is trying to figure out what's a cause, and what's a symptom :-)

I'd be curious what all you see if you type:

find /etc/webmin

If you could attach that as a text file, that'd be super.

One of the things I'm curious about is if the /etc/webmin/virtual-server directory exists.

And if so, are you able to create files in it manually, as root?

Just some thoughts... thanks,


Thu, 01/14/2010 - 09:40

It doesn't exist. As I stated in my original post, I created the folder then the underlying config file. After running the install again, the config file was populated with information.

Here's the screencap. I blanked out the .acl file with my name.

Thu, 01/14/2010 - 09:46

Here's the find command.

Thu, 01/14/2010 - 10:42

You know...I just reread the OP's post. My error is slightly different, in that the folder doesn't exist. I can create the folder, and write to it. The install file seems to not create it, causing this initial error:

Setting up webmin-virtual-server (3.76.gpl) ...

Error: Failed to open /etc/webmin/virtual-server/plans/0 for writing : Bad file descriptor Error

Failed to open /etc/webmin/virtual-server/plans/0 for writing : Bad file descriptor

It goes and installs a bunch of stuff until it errors here:

Configuring Virtualmin Error: Failed to open /etc/webmin/virtual-server/config for writing : Bad file descriptor Error

...then it bombs out.

Fri, 01/15/2010 - 21:43

Well...I just loaded my server with CentOS 5. The install went through, but I still had the same issue as before. It also installed on a weird port: 7292.

I ended up running the --uninstall, then installing webmin from the RPM. I then installed Virtualmin and Usermin from within Webmin. I kick myself for not thinking about this before, because I prefer Ubuntu.

I don't know what could've caused my issues with the install script.

Fri, 01/15/2010 - 22:36

Yeah, I've never heard of any of that happening before, and in talking to Jamie, we're kind of short on ideas :-)

The best I can offer is that, if you have an install that you're seeing this error on, one of us could log in and take a peek around to see if we can find anything that appears to be triggering that problem.


Fri, 01/15/2010 - 23:38

I'll load a virtual server, and see if I have the same problem. If I do, I'll let you guys know.

Topic locked