I've been working with git repositories cloned on samba share for about one 
year and apart from few problems with setting it up there weren't any 
issues with it.
Recently I tried to add some files to existing repository and was surprised 
to see "permission denied" errors. 
As an ugly workaround I clone the repo on local drive and sync with share 
using lsyncd.

When I try to clone fresh repo I get:
$ GIT_TRACE=2 git clone git@gits:test_repo.git test_repo_1
trace: built-in: git 'clone' 'git@gits:test_repo.git' 'test_repo_1'
Cloning into 'test_repo_1'...
trace: run_command: 'ssh' 'git@gits' 'git-upload-pack '\''test_repo.git'\'''
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 3477 on bjauy' '--check-self-contained-and-connected'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 3477 on bjauy' '--check-self-contained-and-connected'
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 3477 on bjauy' '--check-self-contained-and-connected'
fatal: Unable to create temporary file 
'/media/smb/test_repo_1/.git/objects/pack/tmp_pack_XXXXXX': Permission 
fatal: index-pack failed

I'm using git, samba 4.1.1 on 64-bit Archlinux. I haven't been 
changing anything in git nor samba configuration since ages.

Share is mounted using systemd automount in /etc/fstab:
//SERVER/DATA  /media/smb  cifs 
0 0

mount appears as:
//SERVER/DATA on /media/smb type cifs 

Samba share permissions:
$ ls -lan /media/smb/test_repo_1/.git/objects/pack
total 0
drwxr-xr-x 2 1000 100 0 11-20 08:08 .
drwxr-xr-x 2 1000 100 0 11-20 08:08 ..
-rwxr-xr-x 1 1000 100 0 11-20 08:08 tmp_pack_1yHBfX
-rwxr-xr-x 1 1000 100 0 11-20 08:08 tmp_pack_f4lu8W

Local repo permissions:
$ ls -lan ~/test_repo_1/.git/objects/pack
total 24
drwxr-xr-x   2 1000 100 4096 07-19 10:17 .
drwxr-xr-x 184 1000 100 4096 11-19 13:12 ..
-rwxr-xr-x   1 1000 100 2892 07-19 10:17 
-rwxr-xr-x   1 1000 100 8715 07-19 10:17 

Can someone guide me how can I debug it further? Have I missed something 
obvious here?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to