title: SVN post-commit - permission denied to .svn/lock
body: <p>After commiting, I get a <code>post-commit hook failed</code> error:</p>
  
  <pre><code>svn: Can't open file '.svn/lock': Permission denied
  </code></pre>
  
  <p>Oddly, my post-commit hook file runs perfectly fine on it's own, just not when called from an actual commit.</p>
  
  <p>Now, the post-commit file ends up <code>svn update</code>ing another working copy, so I assume the error is in this working copy.</p>
  
  <p>When I go into <code>.svn</code> on this working copy, there is no <code>locks</code> file/directory. This is presumably why the script fails.</p>
  
  <p>This is my post-commit file:</p>
  
  <pre><code>#!/bin/sh
  
  REPOS="$1"
  REV="$2"
  
  cd /var/www
  /usr/bin/svn update
  </code></pre>
  
  <p>How can I fix the problem?</p>