I have an Ubuntu Server, where several users log in to upload some files. Each user has a home directory, in which I 'd like to be chrooted.

e.g. user1 connects with sftp to the server and is located at his home directory (e.g. /var/www/user1) and I 'd like him to be unable to "see" outside of this directory. Is there any easy way to handle this?

  • If you downvoted this question, please comment and say why. I don't see an obvious reason for the downvote. – pjmorse Apr 27 '12 at 17:53

Yes you can, look for ChrootDirectory by man sshd_config in your system, unless your sshd is too old.

| improve this answer | |
  • From memory, it's SSH 4.8p1 where they added this. If you want an LTS release you'll have to go for 12.04. – Ladadadada Apr 27 '12 at 15:34
  • You are right about the sshd version, I just googled the openssh server log and it is there. Thanks! – johnshen64 Apr 27 '12 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.