How can I achieve this setup:
There is a primary user that I use to ssh into the server and edit all files for multiple sites.
The various sites are stored in the
/srv/www directory, so
There is a different user created for each site that Nginx will use to run the site (apparently this is good for security).
I want to be able to have all files in
/srv/www/site1 be owned by the
site1 user and belong to the
site1 group. I want to be able to edit these files and create new ones with my primary user while still keeping the owner site1 and group site1.
I understand that I need to set the default
umask somehow, and I may need to add my primary user to each site's group, but I can't seem to make this work. Any help, or is this even a good idea?