Permissions with Git Post-Receive
问题 I have setup git locally and on my server and created a 'post-receive' so that when I do a push to the live server it should then checkout to the virtual hosts directory of the website. #!/bin/sh GIT_WORK_TREE=/var/www/domainname/public_html/ git checkout -f However, when I try to do my push, it goes out the master successfully but I get permission denied errors when trying to create those files on my server web root. e.g. remote: error: unable to create file index.php (Permission denied)