I'm in charge of administering a WWW linux server at work.
I have a team of web developers which need to work on a specific directory (let's say /var/www/website). Every developer should be able to read/write every file in this directory. They connect to the server using a SFTP client.
Every developer is part of the "webdevelopers" group, has the home directory pointing to "/var/www/website" and a "/bin/false" shell. Then, to increase the security, I've set up a SFTP chroot in the sshd server:
Subsystem webdevelopers internal-sftp
Match Group webdevelopers
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no
This work well, except that if a developer create a file, another developer is not able to write it.
The permission on the directory they need to work on is 644 for files and 755 for the directories. This server is facing the internet, so 777 permissions are not a solution.
How can I allow those people to work on these directory without messing up the above permissions?