0

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.

0

2 Answers 2

0

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.

0

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.

1
  • Link-only answer is considered low quality; it will be useless if the target site moves or vanishes. Please cite the relevant part of the solution here. Aug 29, 2018 at 18:26

You must log in to answer this question.

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