Look at this very useful page:
http://www.fuschlberger.net/programs/ssh-scp-sftp-chroot-jail
Download make_chroot_jail.sh from there,
and add in the line useradd ... the desired group (e.g.: -g www-data).
Then run script as follows:
./make_chroot_jail.sh USERNAME /var/www/vhosts/YOURDOMAIN.COM/.bashrc /var/www/vhosts/YOURDOMAIN.COM
Change the access rights for desired folder(s):
chown 775 /var/www/vhosts/YOURDOMAIN.COM/htdocs -R
That's all!
No comments:
Post a Comment