How to make symbolic link on Linux chroot or jail user

Sometimes we need to create a jailed user on Linux to restrict that user.

However, sometimes we need the jailed user to be able to access directories outside the home directory of the jailed user.

How to allow access to a symbolic link when chrooted on the home directory.

In this situation, symbolic links and hard links will failed.

Then we will use the mount command with the addition of bind.

For example the jail user’s directory is /hom /jail/home/user and you want that user to be able to access /var/www/html/video_upload

And to enable on boot, edit /etc/fstab and add this line at the end

To test your fstab first unmount /home/jail/home/user/video_upload and then try to mount all volume.

Hope this helps.

Leave a Reply

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