I try to copy the content of a Git Repo from my VPS Homedirectoy into my public_html Folder.
So i've createt a post-receive hook with:
GIT_WORK_TREE=/var/www/domainname/public_html git checkout -f
And i've set its permission with:
chmod +x post-receive
But nothing happens. So i've set the permissions of public_html to:
$ sudo usermod -a -G www-data myUser
$ sudo chmod -R g+w /var/www/domainname/public_html
Doesnt work either. I've already tried some of the solutions proposed here on stackoverflow regarding permissions without success. Any ideas ?