- I'm using rsync to deploy some static HTML that is going to be served by nginx.
- The user that is running rysnc is "jenkins"
- nginx is using the www-data group to access the folder.
- jenkins is member of www-data
ssh onto the Ubuntu 14.04 server in question and run
sudo chown -R jenkins:www-data /home/jenkins/thesite
then from another machine I run
rsync -rtzh --delete --omit-dir-times _site/ jenkins@the_server.com:/home/jenkins/thesite
When that has finished some (but not all) of the files now have their group set to jenkins. So
nginx can't access them.
It doesn't seem to just be the files I've changed that have the permission issue but I'm generating the files using Jekyll which might impact or could just be a massive red herring.
In the Windows world I'd set the permissions on the parent folder and tell it to make children inherit. Is there a Linux equivalent or am I doing something silly with