post-receive hook permission denied "unable to create file" error
Posted
by
ThomasReggi
on Server Fault
See other posts from Server Fault
or by ThomasReggi
Published on 2012-06-26T15:59:04Z
Indexed on
2012/06/27
15:18 UTC
Read the original article
Hit count: 338
Just got gitolite
installed on my webserver and am trying to get a post-receive
hook that can point the git dir
in apache's direction.
This is what my post-receive
hook looks like. Got this script from the Using Git to manage a web site.
#!/bin/sh
echo "post-receive example.com triggered"
GIT_WORK_TREE=/srv/sites/example.com/public git checkout -f
This is the error response i'm getting back from git push origin master
from my local workstation. These are files from within my repository.
remote: post-receive example.com triggered
remote: error: unable to create file .htaccess (Permission denied)
remote: error: unable to create file .tm_sync.config (Permission denied)
remote: fatal: cannot create directory at 'application': Permission denied
Permissions of public
.
drwxr-xr-x 5 root root 4096 Jun 26 17:23 public
© Server Fault or respective owner