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

Re: git repo corruption

From
NKNeal Kreitzinger <nkreitzinger@gmail.com>
Date
Jan 4, 2011, 21:42 UTC
Message-ID
<4D239450.2010509@gmail.com>
In-Reply-To
<AANLkTi=TSy1WQZARNQgGfPiV93hQ-xmCTip75JAixgDB@mail.gmail.com>
On 1/4/2011 3:10 AM, Levend Sayar wrote:
Show 18 quoted lines
> Hi, all.
>
> We have a repo on a corporate server. The sysadmin changed access
> rights of files on our repo by accedant.
> Some directories have 2750 acces rights before, but he changed as
>
> chmod -R 2770 *
>
> Now when you make git status, every file that is tracked by git is said as
>
> changed but not updated
>
> So is there a way to get this back to normal ?
>
> TIA
>
> _lvnd_
> (^_^)
I assume the correct permissions for your tracked files should be 2750? 
  If so, then here's what I would do:
1.  First make a copy of your repo and test these steps on the copy:

e.g. bare repo: cp -rvp repo.git repocopy.git non-bare-repo: cp -rvp worktree worktreecopy

2. Then cd to the parent of the objects dir in you git repo:

e.g. bare repo: cd repocopy.git non-bare repo: cd worktreecopy/.git

3.  Then change the permissions of your objects dir:
chmod -R 2750 objects
4.  Validate the results.  Your permissions should match again.
5.  If it worked, then do it on the real repo.

v/r, Neal

Previous: Drew NorthupNext: Neal Kreitzinger
Message 3 of 6 in “git repo corruption”
  1. Levend SayarJan 4, 2011
  2. Drew NorthupJan 4, 2011
  3. Neal KreitzingerJan 4, 2011
  4. Neal KreitzingerJan 5, 2011
  5. Levend SayarJan 5, 2011
  6. Jakub NarebskiJan 5, 2011

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.