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

Re: permissions and packed-refs?

From
Logan Kennelly <logank@sent.com>
Date
Apr 10, 2008, 18:19 UTC
Message-ID
<135BAC69-9549-4E61-BD6F-A99364C27CCC@sent.com>
In-Reply-To
<10723DA2-555B-40DB-8428-BDF07CA2510E@manchester.ac.uk>
On Apr 10, 2008, at 9:21 AM, Robert Haines wrote:
> I've seen this after git gc too. Has the owner of the affected  
> files changed? If so you need to make sure that git gc is run by  
> the correct user. If you run it as root for example, everything it  
> touches will end up owned by root!

Not only that, but you must make sure that you have the appropriate umask set. I'm not sure if this affects the pack file, but the reflog is certainly rewritten in a way that prevents other users from pushing.

I've been meaning to submit a patch to make git better honor "core.sharedrepository" (it's probably as simple as adding a couple calls to adjust_shared_perm), but the workaround was so easy that I had forgotten about the issue.

-- 
                                                         Logan Kennelly
       ,,,
      (. .)
--ooO-(_)-Ooo--
Previous: Robert HainesNext: Nigel Magnay
Message 3 of 4 in “permissions and packed-refs?”
  1. Nigel MagnayApr 10, 2008
  2. Robert HainesApr 10, 2008
  3. Logan KennellyApr 10, 2008
  4. Nigel MagnayApr 10, 2008

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.