Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to limit sftp for a user to a certain folder.

So far I have followed this tutorial to the letter:

http://shapeshed.com/chroot_sftp_users_on_ubuntu_intrepid/

It works in the sense that I can log in with the users details but it appears this user can go up in the hierarchy to other folders.

Are there other permission to be set to prevent access to other folders?

Also this user can browse all other folders but has no write/delete access to any folder even the one he is supposed to have access to.

share|improve this question

2 Answers 2

I just ommited the last step of that tutorial

chown root:root theirsite.com

If I leave that off that part, the new user can write to that directory. So the writing issue seems to be solved. He can't write to any other directory above so that's also great.

The only problem left is that he can still browse up the tree. I don't want this user to see other content or sites on the server.

share|improve this answer

Here's some documentation if you're using OpenSSH. OpenSSH SFTP chroot() with ChrootDirectory. With that you can define which folders sftp-users are allowed to see.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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