git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Permissions of objects within shared repo
@ 2009-05-01  1:49 Adam Mercer
  2009-05-01 13:01 ` Johannes Schindelin
  2009-05-01 13:58 ` Brandon Casey
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Mercer @ 2009-05-01  1:49 UTC (permalink / raw)
  To: GIT

Hi

We have a shared repository with the following config:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = true
        sharedrepository = 1
[receive]
        denyNonFastforwards = true

Users push their commits to the repository over ssh, all users are in
group 1000 and so far everything seems to be working OK. However I
have noticed that something seems to be strange with the permissions
of the objects, e.g.:

[ram@g3 ~]$ cd /path/to/repo.git/objects/00/
[ram@g3 00]$ ls -l
total 43
-r--r--r--+ 1 user1           1000  2729 Apr 19 13:13
028ade623678384fca34c51e0ea3ae91b8a50d
-r--r--r--+ 1 user1           1000 10697 Apr 20 21:19
0d9f5769a65081bf95d64b0a23b62b55095f2f
-r--r--r--+ 1 user2           1000   297 Apr 17 10:00
2b3138d14b41d5a01308edd32e8af5ad4c4886
-r--r--r--+ 1 user3           1000   169 Apr  9 12:03
8ab284186f0ceb450d86e3ff1eca486eb6f5b3
-r--r--r--+ 1 user4           1000   846 Apr 27 16:51
90192a4a1843e5849129312ac3bc98766c4c85
-r--r--r--+ 1 user5           1000   602 Apr 13 20:37
948b07abc15345dc31a15757cbc248fa95e49e
-r--r--r--+ 1 user4           1000   435 Apr 20 17:44
a30f4ded65434a2a2d050d98657c118665578f
-r--r--r--+ 1 user6           1000   818 Apr 25 04:11
a5fed2108570efb32e6db519cda92b07e91994
-r--r--r--+ 1 user6           1000   169 Apr 26 13:34
a756fb8966f4564e522471230f5bfe72e33776
-r--r--r--+ 1 user7           1000   379 Apr  9 04:59
bb60a52d841151b564267de8c37a2198a5812e
-r--r--r--+ 1 user8           1000   846 Apr 16 10:55
db929d4496f84b5d7e6a5bd9aeda904bf1b3e6
-r--r--r--+ 1 user2           1000  2089 Apr 20 07:24
ddd0edf3c9b1b94e7036f44a65cf71ace1cfb2
[ram@g3 00]$

will this cause a problem when git gc --auto decides its time to put
these loose objects into a pack, i.e. will they be able to be removed?

Cheers

Adam

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

* Re: Permissions of objects within shared repo
  2009-05-01  1:49 Permissions of objects within shared repo Adam Mercer
@ 2009-05-01 13:01 ` Johannes Schindelin
  2009-05-01 15:15   ` Adam Mercer
  2009-05-01 13:58 ` Brandon Casey
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2009-05-01 13:01 UTC (permalink / raw)
  To: Adam Mercer; +Cc: GIT

Hi,

On Thu, 30 Apr 2009, Adam Mercer wrote:

> We have a shared repository with the following config:
> 
> [core]
>         repositoryformatversion = 0
>         filemode = true
>         bare = true
>         sharedrepository = 1
> [receive]
>         denyNonFastforwards = true
> 
> Users push their commits to the repository over ssh, all users are in
> group 1000 and so far everything seems to be working OK. However I
> have noticed that something seems to be strange with the permissions
> of the objects, e.g.:
> 
> [ram@g3 ~]$ cd /path/to/repo.git/objects/00/
> [ram@g3 00]$ ls -l
> total 43
> -r--r--r--+ 1 user1           1000  2729 Apr 19 13:13
> 028ade623678384fca34c51e0ea3ae91b8a50d

Objects are immutable.  So they do not need to be writable at all.

Hth,
Dscho

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

* Re: Permissions of objects within shared repo
  2009-05-01  1:49 Permissions of objects within shared repo Adam Mercer
  2009-05-01 13:01 ` Johannes Schindelin
@ 2009-05-01 13:58 ` Brandon Casey
  1 sibling, 0 replies; 4+ messages in thread
From: Brandon Casey @ 2009-05-01 13:58 UTC (permalink / raw)
  To: Adam Mercer; +Cc: GIT

Adam Mercer wrote:

> [ram@g3 ~]$ cd /path/to/repo.git/objects/00/
> [ram@g3 00]$ ls -l
> total 43
> -r--r--r--+ 1 user1           1000  2729 Apr 19 13:13
> 028ade623678384fca34c51e0ea3ae91b8a50d

> will this cause a problem when git gc --auto decides its time to put
> these loose objects into a pack, i.e. will they be able to be removed?

On POSIX filesystems it's the _directory_ permissions which control whether
or not the directory contents can be deleted.

Do:

   ls -ld /path/to/repo.git/objects/00/

and you should see that the group has write permission to this directory
which will allow group members to delete files residing in the directory.

-brandon

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

* Re: Permissions of objects within shared repo
  2009-05-01 13:01 ` Johannes Schindelin
@ 2009-05-01 15:15   ` Adam Mercer
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Mercer @ 2009-05-01 15:15 UTC (permalink / raw)
  To: GIT

On Fri, May 1, 2009 at 08:01, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:

> Objects are immutable.  So they do not need to be writable at all.

On Fri, May 1, 2009 at 08:58, Brandon Casey <casey@nrlssc.navy.mil> wrote:

> On POSIX filesystems it's the _directory_ permissions which control whether
> or not the directory contents can be deleted.
>
> Do:
>
>   ls -ld /path/to/repo.git/objects/00/
>
> and you should see that the group has write permission to this directory
> which will allow group members to delete files residing in the directory.

Of course, thanks! Sorry for the noise.

Cheers

Adam

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

end of thread, other threads:[~2009-05-01 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-01  1:49 Permissions of objects within shared repo Adam Mercer
2009-05-01 13:01 ` Johannes Schindelin
2009-05-01 15:15   ` Adam Mercer
2009-05-01 13:58 ` Brandon Casey

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).