Moving /home !

maia

Verified User
Joined
Jul 7, 2016
Messages
12
hi guys,

I've got a little issue and the only way I can think of solving it is to move all the users' /home directories.

the problem: I'm running DA on Proxmox to get the best of both worlds! But the / partition is only 20Gb, so I put the users' directories on the 2Tb partition (already mounted elsewhere) in another folder and symink'd that folder to /home. Everything works fine and dandy.

What happens is though, when I try to use SitePad as a website builder it can't ftp in as ftp don't like the old symlink thing!

So, I tried mounting the users' folder with mound --bind. That worked but the system then reports the / partition as full as the folder holds 35Gb and the / is only 20Gb.

So, the only other option I can think of is to let DA use the real users' folder as the default.

I've had a good search around but can't find much about 'moving' existing users home directories out of /home to somewhere else.

Your thoughts and ideas please!

Kind regards,

Dave
 
Hello Dave,


Something like that:

1. Rename /home to /home-old
2. Create empty folder /home
3. Mount 2Tb to /home
4. Move content of
/home-old to /home
5. update /etc/fstab
6. restart services and/or server (optional)
 
Hi Alex,

Thanks for getting back.

If only it were that simple ��

The 2tb drive is currently mounted as the storage for the proxmox virtual servers, so can't mount it anywhere else. The user data lives in a sub directory next to the vps hard drives. Quite neat as all user data is on a separate partition.

So changing DA to look elsewhere is the only real option if I want to get this ftp script working.

Cheers
 
That sounds good. I can see how that works for the new user and exim.

Any idea which, if any, config I would have to change for existing users? Apache etc al.

Cheers
 
Update /etc/password directly or with Linux command usermod to update user's homedir location, and then run:

Code:
cd /usr/local/directadmin/custombuild/
./build update && ./build rewrite_confs

That should help.
 
Thanks Alex,

I'd forgotten about /etc/passwd.

And DA will re write all the httpd conf files?! How handy.

I'll try it this morning ��

Cheers
 
Me again,

Just had a response from the Sitepad guys and they're saying that although everything is setup find and as we know DA is working in the current config, my $_SERVER['HOME'] var is set to the actual location is the user files and not /home/username .

Is there any risk if I change $_SERVER['HOME'] to /home/username and if there​ isn't what's the easiest way to do it? Hehe.

Cheers
 
Not too sure what you are asking here...

$_SERVER['HOME'] will always show your real homedir location as set in /etc/passwd (it's defined from user's environment).

So if for any reason your PHP application depends on
$_SERVER['HOME'] you should think twice+ before preceding with moving homedirs.
 
Hi Alex,

I got a little confused - the description was a little confusing. $_SERVER['HOME'] shows the correct location, they were asking if i could change it to the actual path. Not sure that's the best idea.

They're working on making the script work through the symlink - will report back!

thanks again
 
Hi All,

looks like all the research above wasn't needed, but good info nonetheless!

The chaps at Sitepad have updated their script (for me at least so far) to be able to follow symlinks so the script can ftp in and upload the websites - good news!

There is now a nice simple website builder available to my customers. If anyone would like to try it out they have a demo on their site or I'd be happy to take questions.

Thanks for all your efforts, again, great support from the DA community.

Cheers,

Dave
 
Back
Top