Hi!
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 
denied
fatal: index-pack failed

I'm using git 1.8.4.2, 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 
user,noauto,credentials=/etc/samba/creds,workgroup=PRV,uid=1000,gid=users,_netdev,comment=systemd.automount
 
0 0

mount appears as:
//SERVER/DATA on /media/smb type cifs 
(rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,domain=PRV,
uid=1000,forceuid,gid=100,forcegid,addr=10.1.1.5,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)

Samba share permissions:
$ ls -lan pwDevCeneoPlugin_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 
pack-67f0ff8f3955aa4cb9a77b46838d0b7b80a26166.idx
-rwxr-xr-x   1 1000 100 8715 07-19 10:17 
pack-67f0ff8f3955aa4cb9a77b46838d0b7b80a26166.pack

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