I have an Ubuntu server with several sites on it.
I would like to create SFTP accounts for my developers and give them access to only a single website.
For example developer_A would only have access to website_A developer_b would only have access to website_B
I created the users, set their home folders to website_A and website_B respectivaly and then used chown to make them the owners of website_A and website_B.
The problem is that the developers can still navigate outside of their home folders and access all the folders one level up (with just read permission and nothing else).
Is there a way to prevent the developers from viewing any other folder outside of their home directory? (so for developer_A, I want him to be stuck in /html/website_A)
If tried with Match User in sshd_confing like so:
Match User developer_A
ChrootDirectory /html/website_A
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
but once I do that, I can no longer connect to the server with that user, even though /html is owned by root and nobody else has write permission to /html.
Is there a simple way to achieve what I'm looking for? Any help is appreciated. Thanks in advance!