Issue
How can I share more directories with single user account over CageFS?
Environment
CloudLinux OS 6(h)/7(h)/8
cPanel/Plesk/DirectAdmin/No panel
Solution
Due to a design CageFS mounts user homes as /home/username, no matter in which /home2/ .. /homeN/ user alive in real system.
This could cause some PHP scripts to work incorrectly, however, CageFS has a mechanism to make any additional location with users content available from inside. This is also a quite useful way to share needed backup directories for users if you are giving FTP/SSH access to them. Also, you can use this feature to provide access to /homeabc/username when /home/username is a symlink to it.
To enable this feature the following line should be added to /etc/cagefs/cagefs.mp file:
%/homeabc
Then remount all with:
cagefsctl --remount-all
After that, a user can see both his /home/username and /homeabc/username from CageFS inside. Other directories in /homeabc as well as in /home will be still hidden for him.
Comments
0 comments
Please sign in to leave a comment.