[OpenAFS] using git repo on a afs mapped network drive

Douglas E. Engert deengert@anl.gov
Tue, 07 Feb 2012 10:36:15 -0600

On 2/7/2012 9:16 AM, Christopher Pax wrote:
> problem: I am unable to make a commit to git repository inside a afs folder.
> error: unable to write sha1 filename .git/objects/63/... permission denied
> system info:
> Windows 7 64bit
> AFS Version client 1.5.9906
> git, mysysgit, Git-1.7.8-preview20111206
> I have proper tokens and permissions for the folder. creating a .git repo is not a problem, just adding a file.
> similar issues:
> https://lists.openafs.org/pipermail/openafs-info/2011-March/035795.html
> http://stackoverflow.com/questions/3829498/git-over-samba-unable-to-write-sha1-filename-permission-denied

May be a git problem:

in sha1_file.c move_temp_to_file tries to rename or unlink and link
to move the  temp file. But the file has a strange set of permisions.

In sha1_file.c in create_tmpfile()

	fd = git_mkstemp_mode(buffer, 0444);

  This then results in wrapper.c git_mkstemps_mode()

     fd = open(pattern, O_CREAT | O_EXCL | O_RDWR, mode);

0444 looks strange for a file that is meant to be read and written
or renamed. But 0444 this mode is used in other places in git as well.
I would expect 0666 to be used.

Some combination of Windows and Samba or AFS processing causes
a permission problem, where as Unix may let the owner still
write or at least rename or link the file.



  Douglas E. Engert  <DEEngert@anl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444