git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allan Wind <allan_wind@lifeintegrity.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: gc changes permissions of files
Date: Sun, 15 Jun 2008 02:27:36 -0400	[thread overview]
Message-ID: <20080615062736.GC14357@lifeintegrity.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0806150551010.6439@racer>

On 2008-06-15T06:38:21+0100, Johannes Schindelin wrote:
> On Sat, 14 Jun 2008, Allan Wind wrote:
> 
> > Is anyone looking into fixing gc so it does not change permission on 
> > files?  I would think it should consider current permissions of files 
> > before umask.
> > 
> > I believe Nigel reported this issue with:
> > http://thread.gmane.org/gmane.comp.version-control.git/79213/focus=79237
> > and still seeing issues with 1.5.5.4.
> 
> It would have been nice to briefly illustrate the problem again.

Of course.

# umask
umask 0022
# find . -ls > /tmp/before
# git gc
Counting objects: 1435, done.
Compressing objects: 100% (747/747), done.
Writing objects: 100% (1435/1435), done.
Total 1435 (delta 690), reused 1422 (delta 682)
# find . -ls > /tmp/after

On these files group write is revoked when running gc (g-w).  /tmp/before:

 16420 662752 -rw-rw----   1 root     users    677990209 Jun 15 01:49 ./objects/pack/pack-f962a3321392570
5b321ad2ba6ccb0037114f92d.pack
 16432   36 -rw-rw----   1 root     users       35504 Jun 15 01:49 ./objects/pack/pack-f962a33213925705b3
21ad2ba6ccb0037114f92d.idx
...
 18258    4 drwxrwx---   2 allan    users        4096 Jun 15 01:47 ./logs/refs/heads
 16481    8 -rw-rw----   1 root     users        6100 Jun 15 01:47 ./logs/refs/heads/master

and /tmp/after:

 16401 662752 -r--r--r--   1 root     root     677990209 Jun 15 01:59 ./objects/pack/pack-f962a3321392570
5b321ad2ba6ccb0037114f92d.pack
 16404   36 -r--r--r--   1 root     root        35504 Jun 15 01:59 ./objects/pack/pack-f962a33213925705b3
21ad2ba6ccb0037114f92d.idx
...
 16402    8 -rw-r--r--   1 root     root         6100 Jun 15 01:57 ./logs/refs/heads/master
 16403    8 -rw-r--r--   1 root     root         6100 Jun 15 01:57 ./logs/HEAD

and these on these other read permissions (o+r) is added.  /tmp/before:

 16394    4 -rw-rw----   1 root     users          54 Jun 15 01:49 ./objects/info/packs
 16481    8 -rw-rw----   1 root     users        6100 Jun 15 01:47 ./logs/refs/heads/master
 16475    8 -rw-rw----   1 root     users        6100 Jun 15 01:47 ./logs/HEAD
 16485   16 -rw-rw----   1 root     users       14773 Jun 15 01:47 ./packed-refs

and /tmp/after:

 16393    4 -rw-rw-r--   1 root     root           54 Jun 15 01:59 ./objects/info/packs
 16402    8 -rw-r--r--   1 root     root         6100 Jun 15 01:57 ./logs/refs/heads/master
 16403    8 -rw-r--r--   1 root     root         6100 Jun 15 01:57 ./logs/HEAD
 16386   16 -rw-rw-r--   1 root     root        14773 Jun 15 01:57 ./packed-refs

I seem to recall that push to the repository also introduces files without
group write permission.  Unfortunately it looks something broke when I ran
gc.  Any help in getting my repository back up would be appreciated:

allan@vent:~/var/git/www2$ git clone ssh://pawan.localnet./var/lib/git/www.git
Initialized empty Git repository in /home/allan/var/git/www2/www/.git/
fatal: git-upload-pack: cannot find object 56032c4f35fd39fe4151fca2d010d299a8901101:
fatal: The remote end hung up unexpectedly
fetch-pack from 'ssh://pawan.localnet./var/lib/git/www.git' failed.


/Allan

  reply	other threads:[~2008-06-15  6:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-15  3:59 gc changes permissions of files Allan Wind
2008-06-15  5:38 ` Johannes Schindelin
2008-06-15  6:27   ` Allan Wind [this message]
2008-06-15  6:41     ` Allan Wind
2008-06-15  7:10       ` Allan Wind
2008-06-15 22:31     ` Allan Wind

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080615062736.GC14357@lifeintegrity.com \
    --to=allan_wind@lifeintegrity.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).