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?


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.

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.