/var/home instead of /home

5 posts / 0 new
Last post
#1 Fri, 07/13/2007 - 09:52

/var/home instead of /home


I bought virtualmin pro and installed it without problems. Because my server was partioned with 4 GB on /home and 130 GB on /var (and virtualmin seems to prefer /home) i've done the following:

  • re-mounted partition that was on /home to another mountpoint
  • created a symlink from /home point to /var/home
  • enabled quotas on /var

But now, when I create a new virtual host I get this error:

Failed to create virtual server : setquota: Mountpoint (or device) /var/home not found. setquota: Not all specified mountpoints are using quota

Is there any way I can change the default /home to /var/home or hack a certain perl file to prevent this error? Repartioning the server is really my last resort..

Regards, Ivor<br><br>Post edited by: ivor.brands@netjam.nl, at: 2007/07/13 09:52

Sat, 07/14/2007 - 01:52
Joe's picture

Virtualmin is configurable, and doesn't care (much) where you put your homes. You don't need to modify any perl files to make it work with whatever path you like. BUT (and this is a big but), Apache suexec does care. It will not work unless it is explicitly configured with the correct docroot and compiled with that setting.

The default apache package that comes with most Linux distros has suexec docroot set to /var/www or /var/apache. That won't work with /var/home. Our vm Apache packages are compiled with suexec docroot set to /home. This also won't work with /home.

So, your choices are:

Copy /var to what was /home (or put it on /), copy /home to what was /var and remount them under the right names. This is the easiest option, by far. Just proceed with caution while copying, and make sure you have enough room on each destination, and you'll be fine. Symbolic links with something as important and widely varied as /var or /home is not advisable.

Rebuild Apache with support for /var/home as the suexec docroot, and configure Virtualmin to put homes there. This one is second easiest. Rebuilding apache seems intimidating but it really shouldn't. It only takes a few minutes. There's a guide for doing it here in the forums. Here's one of the threads about it with a short guide doing it for Fedora:


Disable suexec. Not recommended unless you don't share this server with anyone, and don't need any of the advanced PHP4/PHP5 stuff or Ruby on Rails or fcgid stuff.


Check out the forum guidelines!

Sun, 07/15/2007 - 15:45 (Reply to #2)

Here's a little update. Before going ahead to rebuild I first tried changing merely the home location from /home to /var/home in the module configuration.

That seems to have done the trick! Suexec works without issues.

Mon, 10/15/2007 - 23:04 (Reply to #3)

On Debian after upgrading suexec broke again, /usr/lib/apache2/suexec -V shows AP_DOC_ROOT=&quot;/var/www&quot;. This has happened about every time apache upgrades and I was under the impression that the apache packages apt-get (should) download from the webmin repository had that fixed already.

I found and posted in the past a quick and dirty fix to the problem that didn't require recompiling, but I can't find my own post on the new forum (can't dee a way to search for my own posts, the search returns way too much or no results)

Apt-cache policy apache2 returns:

Installed: 2.2.3-4+etch1
Candidate: 2.2.3-4+etch1
Version table:
*** 2.2.3-4+etch1 0
500 http://linux.csua.berkeley.edu stable/main Packages
100 /var/lib/dpkg/status
2.0.54-6sarge1vm 0
500 http://software.virtualmin.com virtualmin-sarge/main Packages

Which tells me it got upgraded with a non virtualmin version.... Which way should I go about this?

Mon, 10/15/2007 - 23:13 (Reply to #4)
Joe's picture

You've got etch repositories being installed there.

If you've upgraded to etch, you'll want to also switch your Virtualmin repository to use the etch version. Same path, just replace virtualmin-sarge with virtualmin-etch in /etc/sources.list.


Check out the forum guidelines!

Topic locked