git/list[1] front-page[2] threads[3] people[4] search[5] about
 

directory permissions on AFS

From
JFJaime Frey <jfrey@cs.wisc.edu>
Date
Dec 12, 2012, 23:39 UTC
Message-ID
<0A6FA42F-986D-4C3C-BC50-9A7C0494C703@cs.wisc.edu>
Hi,

We have a shared bare git repository on AFS, which our developers pull from and push to from their local repositories. Some developers access the bare repository directly over AFS and others use ssh. Every couple of months, all of the two-character directories under the objects directory disappear. Afterwards, most pushes fail with an error like this:

error: unable to create temporary sha1 filename ./objects/fb: Permission denied

Stracing git revealed that it successfully recreated the ./objects/fb and then failed to chmod() it. It failed because it tried to set the S_ISGID bit, which mere mortals cannot do on AFS. Manually recreating all of these directories solves the problem.

I took a quick look at the git source and it appears git always tries to set the S_ISGID on a new directory if core.sharedrepository is enabled in the config. I don't know what other effects would result from setting core.sharedrepository to 0.

Would it be feasible to allow the setting of S_ISGID to disabled, apart from modifying core.sharedrepository? Possibly a new config parameter or detecting if the directory is on AFS?

 -- Jaime Frey
Next: Junio C Hamano
Message 1 of 2 in “directory permissions on AFS”
  1. Jaime FreyDec 12, 2012
  2. Junio C HamanoDec 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.