Jail user to a folder
added this to sshd_config
Match group www-data1
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
then
sudo chown root.root /home/www-data1
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.
7 Replies
accounts for users. They can ssh/sftp/scp using public-key authentication. I give them bash, vim, tar, perl and other basic tools, and all of their Web files are in the jail with them. So they can do what they like with their site content, but can't touch anything on my linode.
You can jail them to any folder if you want.
Anyway, I find jailkit to be an excellent piece of software, and
highly recommend it.
I don't want to give any other "powers" to the user, I only want that the user can navigate only in the jail folder and subfolders
The scponly package is in Debian stable.
Before that you may have to run 'dpkg-reconfigure scponly' to set the suid bit of the scponlyc executable.