{"thread":{"id":"3347","subject":"Shared repositories and umask","startedAt":"2006-02-15T12:19:07Z","lastAt":"2006-02-15T14:06:22Z","messageCount":5,"participants":["Martin Mares","Petr Baudis","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"16214","messageId":"mj+md-20060215.120104.14337.atrey@ucw.cz","threadId":"3347","inReplyTo":null,"subject":"Shared repositories and umask","fromName":"Martin Mares","fromEmail":"mj@ucw.cz","sentAt":"2006-02-15T12:19:07Z","receivedAt":"2006-02-15T12:19:07Z","isPatch":false,"sender":{"key":"mj@ucw.cz","avatar":null},"body":"Hello, world!\\n\n\nI'm playing with a shared repository and I am still unable to get the\nfile and directory permissions kept correctly, that is writeable to\na group.\n\nSetting the `core.sharedrepository' flag helps a bit, but not completely:\nthe object files and directories are group-writeable, but for example new\nhead refs aren't.\n\nThe documentation hints on setting umask, but I would really like to avoid\ndoing that globally, because the user accounts are used for many other\nthings as well where the permissions should be tighter.\n\nIt seems that a correct solution would be to add an `umask' option to\nthe repository config and make enter_repo() adjust the umask accordingly.\n\nI was thinking about doing the same in setup_git_directory() for the\nlocal commands, but that probably doesn't make much sense since many commands\nare in fact scripts creating files themselves.\n\nIf you agree, I will send a patch.\n\n\t\t\t\tHave a nice fortnight\n-- \nMartin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/\nFaculty of Math and Physics, Charles University, Prague, Czech Rep., Earth\nQ: How many Prolog programmers does it take to change a light bulb?  A: No.\n"},{"id":"16215","messageId":"20060215130538.GO31278@pasky.or.cz","threadId":"3347","inReplyTo":"mj+md-20060215.120104.14337.atrey@ucw.cz","subject":"Re: Shared repositories and umask","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-02-15T13:05:38Z","receivedAt":"2006-02-15T13:05:38Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nDear diary, on Wed, Feb 15, 2006 at 01:19:07PM CET, I got a letter\nwhere Martin Mares <mj@ucw.cz> said that...\n> I'm playing with a shared repository and I am still unable to get the\n> file and directory permissions kept correctly, that is writeable to\n> a group.\n> \n> Setting the `core.sharedrepository' flag helps a bit, but not completely:\n> the object files and directories are group-writeable, but for example new\n> head refs aren't.\n\n  actually, this is not necessary, since when pushing to shared\nrepositories, the new ref is created in the directory as a lockfile and\nthen moved over the original ref - this makes the ref updating safe and\nraceless, while also making it enough to have the refs directory\ngroup-writable.\n\n  Therefore, it shouldn't be actually necessary to meddle with umask\nanymore. The documentation is obsolete; I'll remove the relevant bits\nfrom Cogito docs.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nOf the 3 great composers Mozart tells us what it's like to be human,\nBeethoven tells us what it's like to be Beethoven and Bach tells us\nwhat it's like to be the universe.  -- Douglas Adams\n"},{"id":"16216","messageId":"Pine.LNX.4.63.0602151448590.10593@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3347","inReplyTo":"20060215130538.GO31278@pasky.or.cz","subject":"Re: Shared repositories and umask","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-02-15T13:51:50Z","receivedAt":"2006-02-15T13:51:50Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 15 Feb 2006, Petr Baudis wrote:\n\n> Dear diary, on Wed, Feb 15, 2006 at 01:19:07PM CET, I got a letter\n> where Martin Mares <mj@ucw.cz> said that...\n> > I'm playing with a shared repository and I am still unable to get the\n> > file and directory permissions kept correctly, that is writeable to\n> > a group.\n> > \n> > Setting the `core.sharedrepository' flag helps a bit, but not completely:\n> > the object files and directories are group-writeable, but for example new\n> > head refs aren't.\n> \n>   actually, this is not necessary, since when pushing to shared\n> repositories, the new ref is created in the directory as a lockfile and\n> then moved over the original ref - this makes the ref updating safe and\n> raceless, while also making it enough to have the refs directory\n> group-writable.\n\nIIRC the relevant discussion was started by this:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/13856\n\n>   Therefore, it shouldn't be actually necessary to meddle with umask\n> anymore. The documentation is obsolete; I'll remove the relevant bits\n> from Cogito docs.\n\nBasically, if you just want a shared repository, you don't need to set the \numask. However, if you want to work in the working directory (multiple \nusers), you have to set the umask (it is not enough that the git tools do \nthat, because you are likely to work with other programs as well).\n\nHth,\nDscho\n"},{"id":"16217","messageId":"20060215135958.GK9573@pasky.or.cz","threadId":"3347","inReplyTo":"Pine.LNX.4.63.0602151448590.10593@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Shared repositories and umask","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-02-15T13:59:58Z","receivedAt":"2006-02-15T13:59:58Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nDear diary, on Wed, Feb 15, 2006 at 02:51:50PM CET, I got a letter\nwhere Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...\n> On Wed, 15 Feb 2006, Petr Baudis wrote:\n> >   Therefore, it shouldn't be actually necessary to meddle with umask\n> > anymore. The documentation is obsolete; I'll remove the relevant bits\n> > from Cogito docs.\n> \n> Basically, if you just want a shared repository, you don't need to set the \n> umask. However, if you want to work in the working directory (multiple \n> users), you have to set the umask (it is not enough that the git tools do \n> that, because you are likely to work with other programs as well).\n\n  yes, but that's kind of rare workflow - I guess mostly when you have\nyour website in GIT and update the working copy in the post-update hook\n- but then you can easily setup umask in the hook as well.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nOf the 3 great composers Mozart tells us what it's like to be human,\nBeethoven tells us what it's like to be Beethoven and Bach tells us\nwhat it's like to be the universe.  -- Douglas Adams\n"},{"id":"16218","messageId":"mj+md-20060215.140603.2281.atrey@ucw.cz","threadId":"3347","inReplyTo":"20060215130538.GO31278@pasky.or.cz","subject":"Re: Shared repositories and umask","fromName":"Martin Mares","fromEmail":"mj@ucw.cz","sentAt":"2006-02-15T14:06:22Z","receivedAt":"2006-02-15T14:06:22Z","isPatch":false,"sender":{"key":"mj@ucw.cz","avatar":null},"body":">   Therefore, it shouldn't be actually necessary to meddle with umask\n> anymore. The documentation is obsolete; I'll remove the relevant bits\n> from Cogito docs.\n\nThanks for the hint!\n\n\t\t\t\tHave a nice fortnight\n-- \nMartin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/\nFaculty of Math and Physics, Charles University, Prague, Czech Rep., Earth\nFirst law of socio-genetics: Celibacy is not hereditary.\n"}]}