posts:nginx: Export HOME=/ to spawn-fcgi process for gitweb
Since Git's
96b9e0e (config: treat user and xdg config permission
problems as errors, 2012-10-13), `git` dies with:
fatal: unable to access '/root/.config/git/config': Permission denied
when it doesn't have access to the HOME directory where it think's its
config files are stored. Running an strace shows:
access("/root/.config/git/config", R_OK) = -1 EACCES (Permission denied)
Since this error is fatal, we need to set the HOME environment
variable to somewhere where the server process (the `nginx` user on my
box) *does* have access. Regardless of the user, `HOME=/` should be
pretty safe ;).