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

Shared repositories and umask

From
MMMartin Mares <mj@ucw.cz>
Date
Feb 15, 2006, 12:19 UTC
Message-ID
<mj+md-20060215.120104.14337.atrey@ucw.cz>
Hello, world!\n

I'm playing with a shared repository and I am still unable to get the file and directory permissions kept correctly, that is writeable to a group.

Setting the `core.sharedrepository' flag helps a bit, but not completely: the object files and directories are group-writeable, but for example new head refs aren't.

The documentation hints on setting umask, but I would really like to avoid doing that globally, because the user accounts are used for many other things as well where the permissions should be tighter.

It seems that a correct solution would be to add an `umask' option to the repository config and make enter_repo() adjust the umask accordingly.

I was thinking about doing the same in setup_git_directory() for the local commands, but that probably doesn't make much sense since many commands are in fact scripts creating files themselves.

If you agree, I will send a patch.
				Have a nice fortnight
-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Q: How many Prolog programmers does it take to change a light bulb?  A: No.
Next: Petr Baudis
Message 1 of 5 in “Shared repositories and umask”
  1. Martin MaresFeb 15, 2006
  2. Petr BaudisFeb 15, 2006
  3. Johannes SchindelinFeb 15, 2006
  4. Petr BaudisFeb 15, 2006
  5. Martin MaresFeb 15, 2006

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.