Changing /home location to /home2

X3nO

New member
Joined
Mar 22, 2020
Messages
3
Hello, I want to change the home directory to / home2, I mounted the sdb1 disk there and I want the websites to be there, I added the line create_user_home_override = / home2 to directadmin.conf but the pages are still at home, please help, i use CloudLinux 8
 
I only added create_user_home_override = / home2 in config, I did nothing more, can you show me how to make a package?
 
If it is about moving the whole data, I think the easiest solution is a simple symlink.
 
Let's say the username you wish to move is called "jack". Here is what you can do by logging in with root in SSH:

Code:
mv /home/jack /home2/jack
ln -s /home2/jack /home/jack
chown jack:access /home/jack

After that check user and group of the files to make sure that permissions are ok. You may need to chown the files in /home2. Usually not.

P.S. Having said that, this may actually create issues with Apache (like with it's FollowSymLinks directive which may prevent it from accessing the files if they are served through symlink). According to this answer a better solution thank "ln -s" would be:

Code:
mount --bind --verbose /home2/jack /home/jack

And the command must be add to /etc/fstab in order to work after reboot:

Code:
/home2/jack /home/jack none defaults,bind 0 0
 
Last edited:
Let's say the username you wish to move is called "jack". Here is what you can do by logging in with root in SSH:

Code:
mv /home/jack /home2/jack
ln -s /home2/jack /home/jack
chown jack:access /home/jack

After that check user and group of the files to make sure that permissions are ok. You may need to chown the files in /home2. Usually not.

P.S. Having said that, this may actually create issues with Apache (like with it's FollowSymLinks directive which may prevent it from accessing the files if they are served through symlink). According to this software for iPhone a better solution thank "ln -s" would be:

Code:
mount --bind --verbose /home2/jack /home/jack

And the command must be add to /etc/fstab in order to work after reboot:

Code:
/home2/jack /home/jack none defaults,bind 0 0
Is there a way to switch/change my mock location app with Automagic. I searched through the system settings, but didn't find any that specifies the app to be used. I also searched but didn't find a command that I could run. I have root access. Thanks in advance for the assistance.
 
Is there a way to switch/change my mock location app with Automagic.
Please don't up old threads which do not contain your problem. You have a totally different question, so start a new thread.
Next to that, this is Directadmin, we don't support Automagic so you have to be lucky if somebody can help you. Better ask at Automagic support.
 
Back
Top