Sharing more directories with single user account over CageFS

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:

Then remount all with:

 

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.

Leave a Reply

Your email address will not be published. Required fields are marked *