3

I found very similar questions (like this), but I could not find a solution that applies to my situation.

I need to give an external developer access to one of the hosted website on the machine. The directory structure is this:

apache apache 4096 Jan 23 16:13 /var/www/website-alpha.com/public_html
apache apache 4096 Aug  7 21:22 /var/www/website-omega.com/public_html

The new user should ONLY be able to access (edit, create and delete files) the second directory from the list above. He must not see anything above.

Plus, I should be able to login via terminal or SFTP client (FileZilla, Transmit, etc...)

The server has CentOS 7 with httpd. Any hint? I literally spent hours googling...

1
  • 1
    Why do you have to give him also shell? The chrooted shell is problematic. In your case, if security is important (you don't trust him), then don't give him shell access (sftp has builtin chroot feature). If you can trust him, why do you need the chroot? The only reason if you have to give him shell, if there are also something which he can do only from the unix command line, but it is probably not simple web development.
    – peterh
    Jan 31, 2017 at 7:59

1 Answer 1

2

You are going to need to make a chrooted SSH and chrooted SFTP access. There are lots of good tutorials that you can find by searching Google on the subject. This will get you started. Good luck

You must log in to answer this question.