title: Which user executes the post-receive hook on a Windows machine?
body: <p>So I have that <code>post-receive</code> hook in my bare repo that shall update tickets in my trac installation (hook taken from <a href="http://trac.edgewall.org/attachment/wiki/TracGit/post-receive-hook.py" rel="nofollow">http://trac.edgewall.org/attachment/wiki/TracGit/post-receive-hook.py</a>).</p>
  
  <p>The git repo is located on drive <code>G:</code> while the trac database is stored on <code>F:\user\trac\myproject</code>. I customized the original hook so that the paths are correct:</p>
  
  <pre><code>TRAC_ENV = 'F:\\User\\Trac\\myproject'
  GIT_PATH = "C:\\Program Files (x86)\\Git\\bin\\git.exe"
  </code></pre>
  
  <p>Before I uploaded the hook to my server, I verified the correct syntax (backslashes and so on) on my local machine where everything works fine.</p>
  
  <p>Now, I uploaded the hook to <code>G:\git\myproject.git\hooks\post-receive</code> and I push some refs. But this gives me an error message:</p>
  
  <pre><code>remote: Traceback (most recent call last):
  remote:   File "hooks/post-receive", line 190, in &lt;module&gt;
  remote:     env = open_environment(TRAC_ENV)
  remote:   File "build\bdist.win-amd64\egg\trac\env.py", line 846, in open_environment
  remote:   File "build\bdist.win-amd64\egg\trac\core.py", line 124, in __call__
  remote:   File "build\bdist.win-amd64\egg\trac\env.py", line 283, in __init__
  remote:   File "build\bdist.win-amd64\egg\trac\env.py", line 392, in verify
  remote: trac.core.TracError: No Trac environment found at f:\user\trac\myproject
  remote: [Errno 2] No such file or directory: 'f:\\user\\trac\\myproject\\VERSION'
  </code></pre>
  
  <p>So I guess it's an access rights related problem and the user that executes the <code>post-receive</code> hook has no access to the trac directory.</p>
  
  <p>In order to overcome this: <strong>which user do I need to give access to the trac database so that the hook gets executed successfully?</strong></p>