title: How can I setup the permissions in Linux so that two users can update the same SVN working copy on the server?
body: <p>My server has both Subversion and Apache installed, and the Apache web directory is also a Subversion working copy. The reason for this is that the simple command <code>svn update /server/staging</code> will deploy the latest source to the staging server.</p>
  
  <p>Apache public web directory: <code>/server/staging</code> <em>— (This is an SVN working copy.)</em></p>
  
  <p>I have two users on my server, 'richard' and 'austin'. They both are members of the 'developers' group. I recursively set permissions on the /server directory to richard:developers, using "sudo chown -R richard:developers /server".</p>
  
  <p>I then set the permissions to read, write and execute for both 'richard' and the 'developers' group.</p>
  
  <p>So surely, 'austin' should now be able to use the <code>svn update /server/staging</code> command? However, when he tries, he gets the error:</p>
  
  <pre><code>svn: Can't open file '/server/staging/.svn/lock': Permission denied
  </code></pre>
  
  <p>If I recursively change the owner of /server to austin:developers, he can run the command just fine, but then 'richard' can't.</p>
  
  <p>How do I fix the problem? I want to create a post-commit hook with to automatically deploy the staging site when files are committed, but I can't see a way for that to work for both users. The hook would be:</p>
  
  <pre><code>/usr/bin/svn update /server/staging
  </code></pre>
  
  <p>Using the same user account for both of them wouldn't really be an acceptable solution, and I'm not aware of any way to run the command inside the hook as 'root'.</p>
  
  <p>Any help is appreciated!</p>