This question has been asked many times, but I haven't found a solution for this type of permission.
I have a VPS with multiple websites in chroot, each one running with a unique user, without root privileges. I'm trying to implement a deployment script, which is run by a master user (not root either), who can access all websites, and modify all files.
A common group
The first advice I normally see, is to create a group, which contains both the master, and all the website users.
As I understand it, I will have to change the permissions of my files and folders to 770 (or something similar that gives group equal permissions as the owner). However, I often experience these permissions being "reset" to 700 (or similar, where group loses the permissions). Most of my sites are built on Wordpress, which might have some automagic security stuff, that resets overblown permissions. Also, if a developer locally changes the group permissions, and uploads these, the permissions will be changed.
I'm looking for a more stable solution - any clues?