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

Re: Git destroys u+s and g+s directory modes

From
HDHadmut Danisch <hadmut@danisch.de>
Date
Dec 27, 2025, 14:44 UTC
Message-ID
<aU/wuT23Ybllu/1q@danisch.de>
In-Reply-To
<aU_lqe2Z47STv68O@kitsune.suse.cz>
On Sat, Dec 27, 2025 at 02:56:57PM +0100, Michal Suchánek wrote:
Show 6 quoted lines
> 
> When you want it to be readable you do not need any special permission
> bits.
> 
> You can set the directories and files to be readable by group, and
> ensure the container user is part of the group.
And that's the problem: 
"ensure the container user is part of the group" is what the S_ISGID flag on directories is good for: It ensures that newly created directories inherit their parent's group. Unix administration basics. 
And this is the bit git clears and breaks this mechanism. 
regards
Hadmut
Previous: Gabor GombasNext: Jeff King
Message 8 of 9 in “Git destroys u+s and g+s directory modes”
  1. Hadmut DanischDec 27, 2025
  2. Michal SuchánekDec 27, 2025
  3. rsbecker@nexbridge.comDec 27, 2025
  4. Hadmut DanischDec 27, 2025
  5. rsbecker@nexbridge.comDec 27, 2025
  6. Andreas SchwabDec 27, 2025
  7. Gabor GombasDec 27, 2025
  8. Hadmut DanischDec 27, 2025
  9. Jeff KingJan 2, 2026

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.