Hi, i tried to jail a user to a folder of my choice but i havea hard time with it. I use openssh, i know that from version 4.9 has a feature ChrootDirectory. I succeded to jail the user to their home directory but i want to jail to a folder of my choice, for example /home/public_html/mysite
added this to sshd_config
Code:
Match group www-data1
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
then
Code:
sudo chown root.root /home/www-data1
Code:
sudo usermod -d / www-data1
It works fine, user www-data1 is jailed to his home folder but how do i jail user to /home/public_html/mysite ?
Thank you.