I have used git trough samba for several times without any issue.
In the last days however, it seems impossible to git all/fetch/commit
The error is :
error: insufficient permission for adding an object to repository database .git/objects
Using strace I can see that error is due to a call on open:
[pid 31303] open(".git/objects/b7/tmp_obj_6wi717", O_RDWR|O_CREAT|O_EXCL, 0444) = -1 EACCES (Permission denied)
[pid 31303] write(2, "error: insufficient permission f"..., 88error: insufficient permission for adding an object to repository database .git/objects
I cannot understand what has changed nor why git is trying to open a file in 444 (read for everybody) with the flag RDRW (read/write ?).
I use git 1.8.5.1 and samba 4.1.3-1 on archlinux, the samba server is a windows (git 1.8.4-1 does not solve the issue even if I used it while it was still working)
I have read other SO questions such as Git over samba - unable to write sha1 filename | Permission denied without finding any hint on how to solve the issue.
.git/objects
is no longer writable by your user. what are the permissions and ownership on it? If you rungit config --list |grep shared
in the shared repository do you seecore.sharedrepository=true
? – Spitsbergen