Take the 2-minute tour ×
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.

My web server structure looks like this:

/Home/User/Public_Html/Website_one
                      /Website_two
                      /Website_three/Directory_one
                                    /Directory_two
                                    /Directory_three 
                                    /Directory_four

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
add comment

1 Answer 1

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
add comment

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.