I know I should be diehard and use git in the terminal, but I use a Git client on Mac called Sourcetree to make the whole thing just a bit more sexy.
The problem is a
After a lot of wasted time I've come to the following solution:
On the Synology NAS server:
control panel -> File Sharing and Priviledges -> Win/Mac/NFS -> Mac File Service -> Apply Default Unix Permissions - Check this box and restart the file service.
Red herrings - stuff I tried an it didn't work.
a) change the Git set up from using the NAS system directly to using Git Server via ssh. b) using/not using Sourcetree for git access c) probably a dozen other things.
Note that the problem is not related to the Git setup but rather to the location of the directory where the check out occurs. without checking the box above, I couldn't change permissions or ownership on the index file even through the Terminal - though I should do it through SSH.
Robert Ramey
It is git in general. This answer suggests, it is because of the filelocking. For more info, just search SO for "git samba"
From my experience, operating on a non-bare repo on a network drive is a bad idea.
For best-practises: http://git-scm.com/book/ch4-1.html
So either:
In any case it is recommended that the git repo with the working copy resides on a local disk.