title: svn post-commit Permission denied
body: <p>Currently i'm trying to setup a post-commit hook that automatically exports the svn copy to my www-root so that my website will be updated after a commit is done.
  The post-commit hook looks like this:</p>
  
  <pre><code>#!/bin/sh
  
  # Delete Old site
  rm -R /var/www/html/sha
  print 1
  # Export Repository
  svn export --force file:///var/local/svn /var/www/html/sha
  
  # Make sure Apache Owns the website
  chown -R www-data:www-data /var/www/html/sha
  </code></pre>
  
  <p>But i get a lot of Permission denied errors when i commit something. Basically like this:</p>
  
  <pre><code>rm: cannot remove '/var/www/html/sha/extensions/LdapAuthentication.php': Permission denied
  </code></pre>
  
  <p>So i know that i need to set some new permissions but i'm not sure what permissions i have do set. the /var/www/html directory has www-data:www-data as user:group.</p>
  
  <p>I connect to the svn server via tunneling meaning svh+ssh://user@host/repo</p>
  
  <p>Any clues?</p>
  
  <p>Okay it seems to work now. I changed the owner of the /var/www/html/sha directory to www-data:walter and remove the chown command, because you need sudo for that anyways. Works like a charm now. Thanks!</p>