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
When you have to unlink file, you have to have permission 'w' for directory, in which file is, not for the file...