{"thread":{"id":"19142","subject":"Permissions of objects within shared repo","startedAt":"2009-05-01T01:49:36Z","lastAt":"2009-05-01T15:15:22Z","messageCount":4,"participants":["Adam Mercer","Johannes Schindelin","Brandon Casey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"112799","messageId":"799406d60904301849t1e77e81bgc6d58ecd0e9d6b7d@mail.gmail.com","threadId":"19142","inReplyTo":null,"subject":"Permissions of objects within shared repo","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2009-05-01T01:49:36Z","receivedAt":"2009-05-01T01:49:36Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"Hi\n\nWe have a shared repository with the following config:\n\n[core]\n        repositoryformatversion = 0\n        filemode = true\n        bare = true\n        sharedrepository = 1\n[receive]\n        denyNonFastforwards = true\n\nUsers push their commits to the repository over ssh, all users are in\ngroup 1000 and so far everything seems to be working OK. However I\nhave noticed that something seems to be strange with the permissions\nof the objects, e.g.:\n\n[ram@g3 ~]$ cd /path/to/repo.git/objects/00/\n[ram@g3 00]$ ls -l\ntotal 43\n-r--r--r--+ 1 user1           1000  2729 Apr 19 13:13\n028ade623678384fca34c51e0ea3ae91b8a50d\n-r--r--r--+ 1 user1           1000 10697 Apr 20 21:19\n0d9f5769a65081bf95d64b0a23b62b55095f2f\n-r--r--r--+ 1 user2           1000   297 Apr 17 10:00\n2b3138d14b41d5a01308edd32e8af5ad4c4886\n-r--r--r--+ 1 user3           1000   169 Apr  9 12:03\n8ab284186f0ceb450d86e3ff1eca486eb6f5b3\n-r--r--r--+ 1 user4           1000   846 Apr 27 16:51\n90192a4a1843e5849129312ac3bc98766c4c85\n-r--r--r--+ 1 user5           1000   602 Apr 13 20:37\n948b07abc15345dc31a15757cbc248fa95e49e\n-r--r--r--+ 1 user4           1000   435 Apr 20 17:44\na30f4ded65434a2a2d050d98657c118665578f\n-r--r--r--+ 1 user6           1000   818 Apr 25 04:11\na5fed2108570efb32e6db519cda92b07e91994\n-r--r--r--+ 1 user6           1000   169 Apr 26 13:34\na756fb8966f4564e522471230f5bfe72e33776\n-r--r--r--+ 1 user7           1000   379 Apr  9 04:59\nbb60a52d841151b564267de8c37a2198a5812e\n-r--r--r--+ 1 user8           1000   846 Apr 16 10:55\ndb929d4496f84b5d7e6a5bd9aeda904bf1b3e6\n-r--r--r--+ 1 user2           1000  2089 Apr 20 07:24\nddd0edf3c9b1b94e7036f44a65cf71ace1cfb2\n[ram@g3 00]$\n\nwill this cause a problem when git gc --auto decides its time to put\nthese loose objects into a pack, i.e. will they be able to be removed?\n\nCheers\n\nAdam\n"},{"id":"112821","messageId":"alpine.DEB.1.00.0905011500530.10279@pacific.mpi-cbg.de","threadId":"19142","inReplyTo":"799406d60904301849t1e77e81bgc6d58ecd0e9d6b7d@mail.gmail.com","subject":"Re: Permissions of objects within shared repo","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-05-01T13:01:16Z","receivedAt":"2009-05-01T13:01:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 30 Apr 2009, Adam Mercer wrote:\n\n> We have a shared repository with the following config:\n> \n> [core]\n>         repositoryformatversion = 0\n>         filemode = true\n>         bare = true\n>         sharedrepository = 1\n> [receive]\n>         denyNonFastforwards = true\n> \n> Users push their commits to the repository over ssh, all users are in\n> group 1000 and so far everything seems to be working OK. However I\n> have noticed that something seems to be strange with the permissions\n> of the objects, e.g.:\n> \n> [ram@g3 ~]$ cd /path/to/repo.git/objects/00/\n> [ram@g3 00]$ ls -l\n> total 43\n> -r--r--r--+ 1 user1           1000  2729 Apr 19 13:13\n> 028ade623678384fca34c51e0ea3ae91b8a50d\n\nObjects are immutable.  So they do not need to be writable at all.\n\nHth,\nDscho\n"},{"id":"112822","messageId":"b_0Yr2BIOq-ZcTAxvkSlKVaJjU1_GJhkRLKGCkG7Uj5ft73JWFjWlA@cipher.nrlssc.navy.mil","threadId":"19142","inReplyTo":"799406d60904301849t1e77e81bgc6d58ecd0e9d6b7d@mail.gmail.com","subject":"Re: Permissions of objects within shared repo","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-01T13:58:15Z","receivedAt":"2009-05-01T13:58:15Z","isPatch":false,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Adam Mercer wrote:\n\n> [ram@g3 ~]$ cd /path/to/repo.git/objects/00/\n> [ram@g3 00]$ ls -l\n> total 43\n> -r--r--r--+ 1 user1           1000  2729 Apr 19 13:13\n> 028ade623678384fca34c51e0ea3ae91b8a50d\n\n> will this cause a problem when git gc --auto decides its time to put\n> these loose objects into a pack, i.e. will they be able to be removed?\n\nOn POSIX filesystems it's the _directory_ permissions which control whether\nor not the directory contents can be deleted.\n\nDo:\n\n   ls -ld /path/to/repo.git/objects/00/\n\nand you should see that the group has write permission to this directory\nwhich will allow group members to delete files residing in the directory.\n\n-brandon\n"},{"id":"112825","messageId":"799406d60905010815h634638f6hf5aa0f149f627607@mail.gmail.com","threadId":"19142","inReplyTo":"alpine.DEB.1.00.0905011500530.10279@pacific.mpi-cbg.de","subject":"Re: Permissions of objects within shared repo","fromName":"Adam Mercer","fromEmail":"ramercer@gmail.com","sentAt":"2009-05-01T15:15:22Z","receivedAt":"2009-05-01T15:15:22Z","isPatch":false,"sender":{"key":"ramercer@gmail.com","avatar":"https://gravatar.com/avatar/16dc719817f62b75075d529ce4ea992ee82bb1a08e45a3029797f39223d6ee64?d=mp&s=160"},"body":"On Fri, May 1, 2009 at 08:01, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n\n> Objects are immutable.  So they do not need to be writable at all.\n\nOn Fri, May 1, 2009 at 08:58, Brandon Casey <casey@nrlssc.navy.mil> wrote:\n\n> On POSIX filesystems it's the _directory_ permissions which control whether\n> or not the directory contents can be deleted.\n>\n> Do:\n>\n>   ls -ld /path/to/repo.git/objects/00/\n>\n> and you should see that the group has write permission to this directory\n> which will allow group members to delete files residing in the directory.\n\nOf course, thanks! Sorry for the noise.\n\nCheers\n\nAdam\n"}]}