I'm creating a webserver, and I will have many users ssh/sftp into it. All they need to do is within their home directory, for example, /home/user/
.
Many people have told me to use chroot, but it seems like it's a little bit too much, plus I'm going to have multiple users log in into the server so it'll be just a huge load on the server.
So to recap, I want to prevent users from leaving their home directory, /home/user/
. Is this possible?
Why would
chroot
be a "huge load on the server"? This is precisely whatchroot
was designed to do. There are guides aplenty on the internets that you can follow to get things set up.SSH has built in chroot features for sftp, with ssh its a bit trickier since the users get to start a fully shell, but its also possible. Check out this howto:
http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny