Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

So far I have followed this tutorial to the letter:

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

I just ommited the last step of that tutorial

chown root:root

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .