Skip to contentSkip to conversation

git init permissions?

DISCUSSION Ferry Huberts (Pelagic) 4 participants 6 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi list,

Maybe a silly question but I couldn't figure out the answer.

I'm looking at the git init --shared=group result and see:

drwxrwsr-x 7 ferry ferry 111 2009-04-14 19:51 .
drwxrwxr-x 3 ferry ferry 17 2009-04-14 19:51 ..
drwxrwxr-x 2 ferry ferry 6 2009-04-14 19:51 branches
-rw-rw-r-- 1 ferry ferry 127 2009-04-14 19:51 config
-rw-rw-r-- 1 ferry ferry 58 2009-04-14 19:51 description
-rw-rw-r-- 1 ferry ferry 23 2009-04-14 19:51 HEAD
drwxrwxr-x 2 ferry ferry 4.0K 2009-04-14 19:51 hooks

drwxrwxr-x 2 ferry ferry   20 2009-04-14 19:51 info
drwxrwsr-x 4 ferry ferry   28 2009-04-14 19:51 objects
drwxrwsr-x 4 ferry ferry   29 2009-04-14 19:51 refs

Is there some kind of reason that the branches directory is not created with +s permissions?

I can understand it for the hooks and info directories since you can not push into those. You _can_ however push into branches and I would expect it to have +s too, like objects and refs.

Bug or my misunderstanding?

git version 1.6.0.6

#1 lore raw

Hi,

Quoted 2 lines · Ferry Huberts (Pelagic)

Is there some kind of reason that the branches directory is not created with +s permissions?

Probably because it isn't really used anymore. It's more like a historical artifact. Branch refs actually live in refs/heads/ and the like (or in the packed-refs file).

-Jan

#2 lore raw
In reply to Ferry Huberts (Pelagic)
Quoted 16 lines · Ferry Huberts (Pelagic)

I'm looking at the git init --shared=group result and see:

drwxrwsr-x 7 ferry ferry 111 2009-04-14 19:51 .
drwxrwxr-x 3 ferry ferry 17 2009-04-14 19:51 ..
drwxrwxr-x 2 ferry ferry 6 2009-04-14 19:51 branches

(quoted diff) +0 -3
-rw-rw-r-- 1 ferry ferry  127 2009-04-14 19:51 config
-rw-rw-r-- 1 ferry ferry   58 2009-04-14 19:51 description
-rw-rw-r-- 1 ferry ferry   23 2009-04-14 19:51 HEAD

drwxrwxr-x 2 ferry ferry 4.0K 2009-04-14 19:51 hooks

drwxrwxr-x 2 ferry ferry   20 2009-04-14 19:51 info
drwxrwsr-x 4 ferry ferry   28 2009-04-14 19:51 objects
drwxrwsr-x 4 ferry ferry   29 2009-04-14 19:51 refs

Is there some kind of reason that the branches directory is not created with +s permissions?

Quoted 8 lines

I can understand it for the hooks and info directories since you can not push into those. You _can_ however push into branches and I would expect it to have +s too, like objects and refs.

Bug or my misunderstanding?

git version 1.6.0.6

This was caused by the template files not getting adjusted permissions set correctly when copied into a new repository (by git init).

This has been fixed (along with other --shared issues) in v1.6.2.3. Please upgrade, if possible.

Have fun! :)

...Johan

Signature · 2 lines
Johan Herland, <[email protected]>
www.herland.net
#3 lore raw
Quoted 24 lines · Johan Herland
Quoted 23 lines · Ferry Huberts (Pelagic)

I'm looking at the git init --shared=group result and see:

drwxrwsr-x 7 ferry ferry 111 2009-04-14 19:51 .
drwxrwxr-x 3 ferry ferry 17 2009-04-14 19:51 ..
drwxrwxr-x 2 ferry ferry 6 2009-04-14 19:51 branches

(quoted diff) +0 -3
-rw-rw-r-- 1 ferry ferry  127 2009-04-14 19:51 config
-rw-rw-r-- 1 ferry ferry   58 2009-04-14 19:51 description
-rw-rw-r-- 1 ferry ferry   23 2009-04-14 19:51 HEAD

drwxrwxr-x 2 ferry ferry 4.0K 2009-04-14 19:51 hooks

drwxrwxr-x 2 ferry ferry   20 2009-04-14 19:51 info
drwxrwsr-x 4 ferry ferry   28 2009-04-14 19:51 objects
drwxrwsr-x 4 ferry ferry   29 2009-04-14 19:51 refs

Is there some kind of reason that the branches directory is not created with +s permissions?

I can understand it for the hooks and info directories since you can not push into those. You _can_ however push into branches and I would expect it to have +s too, like objects and refs.

Bug or my misunderstanding?

Quoted 8 lines
Quoted 1 line

git version 1.6.0.6

This was caused by the template files not getting adjusted permissions set correctly when copied into a new repository (by git init).

This has been fixed (along with other --shared issues) in v1.6.2.3. Please upgrade, if possible.

unfortunately that's not possible since I'm on RHEL.

thanks for the asnwers guys!

#4 lore raw
Quoted 5 lines · Ferry Huberts (Pelagic)
Quoted 2 lines · Johan Herland

This has been fixed (along with other --shared issues) in v1.6.2.3. Please upgrade, if possible.

unfortunately that's not possible since I'm on RHEL.

Out of curiosity, why not? I'm not aware of any official git-1.6.0.6 builds for RHEL, so you must already be using git from a third-party repository.

Signature · 4 lines
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When correctly viewed, everything is lewd.
    -- Tom Lehrer
#5 lore raw
Quoted 10 lines · Todd Zullinger
Quoted 4 lines · Ferry Huberts (Pelagic)
Quoted 2 lines · Johan Herland

This has been fixed (along with other --shared issues) in v1.6.2.3. Please upgrade, if possible.

unfortunately that's not possible since I'm on RHEL.

Out of curiosity, why not? I'm not aware of any official git-1.6.0.6 builds for RHEL, so you must already be using git from a third-party repository.

I did the test on my fedora system. the git version on rhel is even older than 1606