In the remote server I have a post-receive hook set up in order to make a git checkout of my repository:
#!/bin/sh GIT_WORK_TREE=/var/www/ git
After checking the permission of the folder, it is okay with 744. I had the problem with a plugin that is installed on my WordPress site. The plugin has hooked that are in the corn job I suspected.
With a simple sudo it can fix the issue
sudo it can fix the issue
sudo git pull origin master
You have it working.