git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fatal: <hash> is corrupted can be caused by wrong permissions
@ 2014-10-24 13:48 R. David Murray
  2014-10-24 14:05 ` Matthieu Moy
  0 siblings, 1 reply; 3+ messages in thread
From: R. David Murray @ 2014-10-24 13:48 UTC (permalink / raw)
  To: git

A quick search of your mailing list didn't turn up any good hits (not the most
searchable terms and gmane search doesn't seem to support phrases), so I'm
reporting this.

On git 1.7.1 I ran into the Fatal corruption error in one of my projects.  For
reasons that are irrelevant I was operating on the repo as user X, a member of
group Z, but the files were all owned by Y:Z, with (I thought) -rw-rw---
permissions.  After a bunch of head banging I finally figured out that the
Fatal error wasn't because the object files were corrupted, but because three
objects (for reasons unknown to me that are probably lost in the early history
of the setup of this particular repo...one of the blobs was the first commit)
were -rw-----.  So it seems to me that the error message could be improved to
indicate that the reason the object couldn't be used was a permission error.
That's  a different thing from the contents being corrupted.

--David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fatal: <hash> is corrupted can be caused by wrong permissions
  2014-10-24 13:48 Fatal: <hash> is corrupted can be caused by wrong permissions R. David Murray
@ 2014-10-24 14:05 ` Matthieu Moy
  2014-10-25 10:17   ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Moy @ 2014-10-24 14:05 UTC (permalink / raw)
  To: R. David Murray; +Cc: git

"R. David Murray" <rdmurray@bitdance.com> writes:

> On git 1.7.1 I ran into the Fatal corruption error in one of my projects.  For
> reasons that are irrelevant I was operating on the repo as user X, a member of
> group Z, but the files were all owned by Y:Z, with (I thought) -rw-rw---
> permissions.  After a bunch of head banging I finally figured out that the
> Fatal error wasn't because the object files were corrupted, but because three
> objects (for reasons unknown to me that are probably lost in the early history
> of the setup of this particular repo...one of the blobs was the first commit)
> were -rw-----.

I can reproduce with Git 1.7.10 by doing a chmod 0 on some object files,
but recent Git's produce

Checking object directories: 100% (256/256), done.
fatal: failed to read object ab2e06e74d922268fbff8d219dad9eee63786947: Permission denied

So I guess this has already been fixed :-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fatal: <hash> is corrupted can be caused by wrong permissions
  2014-10-24 14:05 ` Matthieu Moy
@ 2014-10-25 10:17   ` Jeff King
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff King @ 2014-10-25 10:17 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: R. David Murray, git

On Fri, Oct 24, 2014 at 04:05:24PM +0200, Matthieu Moy wrote:

> I can reproduce with Git 1.7.10 by doing a chmod 0 on some object files,
> but recent Git's produce
> 
> Checking object directories: 100% (256/256), done.
> fatal: failed to read object ab2e06e74d922268fbff8d219dad9eee63786947: Permission denied
> 
> So I guess this has already been fixed :-).

Probably d6c8a05 (open_sha1_file: report "most interesting" errno,
2014-05-15). The example in the commit message even uses "chmod 0". :)

It's in v2.0.1.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-25 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 13:48 Fatal: <hash> is corrupted can be caused by wrong permissions R. David Murray
2014-10-24 14:05 ` Matthieu Moy
2014-10-25 10:17   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).