Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

My web server structure looks like this:


Now, I need my friend to have access from this server only to Directory_two and Directory_four under website_three.

I have created an SFTP account based on SFTP Jails. I also created a home folder for him and SFTP works fine. But the problem is I couldn't give him access to those directories with sub files. How can I give him access only to Directory_two and Directory_four?

share|improve this question

You probably want to use either mount --bind or bindfs to re-mount those directories (possibly read-only or with special permissions or ownership depending on what you want to do exactly) inside the SFTP chroot jail your friend has access to.

share|improve this answer

Your Answer


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.