We have a web folder /var/www/somesite that's a root for one of the sites. Apache serves files out of here. <div><br></div><div>It is an svn checkout, so that updates could be done by using svn up. </div><div><br></div>
<div>Everything has been going great when I use the root user to update, but now I need to give access to other people to make deployments, and it doesn't seem to be easy to do using regular users. </div><div><br></div>
<div>I have created a group called staff and added the new user to it, lets say user1. </div><div><br></div><div>I ran the following commands to set the permissions </div><div><div><br></div><div>find . -type d -exec chmod 2775 \{} \;</div>
<div>find . -not -type d -exec chmod 0664 \{} \;</div></div><div>chown user1.staff .</div><div><br></div><div>This allows the user to make deployments. </div><div><br></div><div>Now comes in user2. User2 is also a member of group staff, so he can also make deployments. We haven't ran into any issues yet, but I believe as long as the files are owned by staff, both users can change the files, no matter which one of them owns it. </div>
<div><br></div><div>Now we also need to give apache write access to a folder. Lets say /var/www/somesite/files. </div><div><br></div><div>There are several options here. </div><div>- We can add apache to the staff group, but this would give apache access to the whole /var/www/somesite tree. </div>
<div>- We can change the group to apache. We will need to add user1 and user2 to the apache group. One of the problems with this is that the users would have access to everything that apache has access to. Another problem is that while user1 can run chmod -R user1.apache files, it will fail if the files are owned by someone else (like user2 or apache). Is there a way to get around this?</div>
<div><br></div><div>Am I going about this the wrong way? </div><div><br></div><div>Russ</div>