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

Re: git /objects directory created 755 by default?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 22, 2005, 11:27 UTC
Message-ID
<Pine.LNX.4.63.0512221220220.7112@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<43AA75D1.7040009@op5.se>
Hi,
On Thu, 22 Dec 2005, Andreas Ericsson wrote:
Show 30 quoted lines
> Johannes Schindelin wrote:
> > Hi,
> > 
> > On Wed, 21 Dec 2005, Junio C Hamano wrote:
> > 
> > 
> > > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > > 
> > > 
> > > > If you don't use git-shell, because the same machine is used for other
> > > > purposes, it makes sense to introduce
> > > > 
> > > > 	[core]
> > > > 		umask = 0002
> > > 
> > > I agree the setting should not be limited to git-shell, but I do
> > > not think setting "umask" from git configuration is the right
> > > way either.  For files and directories under $GIT_DIR, maybe
> > > imposing the policy git configuration file has is OK, but I
> > > think honoring the user's umask is the right thing for working
> > > tree files.
> > 
> > 
> > As we worked out in another thread, you should not have a working directory
> > when you write-share the repository.
> > 
> 
> Which thread was that? I see no particular problem with having a working
> directory in a write-shared repo. The same care has to be taken there as
> everywhere (pull before push), but that's nothing new.
It was the thread "How to set up a shared repository".

Okay, so there you are. You have a write-shared repository with the HEAD checked out. Somebody wants to push to that with different credentials than the user who checked out the files. Do you plainly deny updating the current HEAD?

If you do, then you better give the pushing user (pun intended) a way to update the checked out files. You can do this by (tadaah) setting the umask to 0002 also for working files.

Yes, we could find out exactly where writes happen inside GIT_DIR and plug in shared.umask which is only applied in these cases, but I am totally unconvinced that this is worth the hassle. In my cases, I am perfectly helped by a umask which is respected throughout git, and the patch is simple enough to be reviewed in 5 minutes.

Ciao, Dscho

Previous: Andreas EricssonNext: Andreas Ericsson
Message 16 of 34 in “git /objects directory created 755 by default?”
  1. Martin LanghoffDec 20, 2005
  2. Junio C HamanoDec 20, 2005
  3. Junio C HamanoDec 21, 2005
  4. Martin LanghoffDec 21, 2005
  5. Junio C HamanoDec 21, 2005
  6. Martin LanghoffDec 21, 2005
  7. Junio C HamanoDec 21, 2005
  8. Martin LanghoffDec 21, 2005
  9. Junio C HamanoDec 21, 2005
  10. Martin LanghoffDec 21, 2005
  11. Ben CliffordDec 22, 2005
  12. Johannes SchindelinDec 21, 2005
  13. Junio C HamanoDec 21, 2005
  14. Johannes SchindelinDec 21, 2005
  15. Andreas EricssonDec 22, 2005
  16. Johannes SchindelinDec 22, 2005
  17. Andreas EricssonDec 22, 2005
  18. Johannes SchindelinDec 22, 2005
  19. Andreas EricssonDec 22, 2005
  20. Johannes SchindelinDec 22, 2005
  21. Andreas EricssonDec 22, 2005
  22. Johannes SchindelinDec 22, 2005
  23. Junio C HamanoDec 22, 2005
  24. Johannes SchindelinDec 22, 2005
  25. Junio C HamanoDec 22, 2005
  26. Johannes SchindelinDec 22, 2005
  27. Junio C HamanoDec 23, 2005
  28. Andreas EricssonDec 23, 2005
  29. Alex RiesenDec 22, 2005
  30. Johannes SchindelinDec 22, 2005
  31. Alex RiesenDec 22, 2005
  32. Johannes SchindelinDec 22, 2005
  33. Alex RiesenDec 22, 2005
  34. Johannes SchindelinDec 22, 2005

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.