{"thread":{"id":"4448","subject":"RE: Git-daemon messing up permissions for gitweb","startedAt":"2006-06-09T20:08:15Z","lastAt":"2006-06-09T21:02:03Z","messageCount":6,"participants":["Post, Mark K","Junio C Hamano","Linus Torvalds","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"21487","messageId":"5A14AF34CFF8AD44A44891F7C9FF41050795787F@usahm236.amer.corp.eds.com","threadId":"4448","inReplyTo":null,"subject":"RE: Git-daemon messing up permissions for gitweb","fromName":"Post, Mark K","fromEmail":"mark.post@eds.com","sentAt":"2006-06-09T20:08:15Z","receivedAt":"2006-06-09T20:08:15Z","isPatch":false,"sender":{"key":"mark.post@eds.com","avatar":null},"body":"Martin is using git over SSH.  I have git-shell in /etc/passwd for his\naccount.\n\nMark Post \n\n-----Original Message-----\nFrom: Junio C Hamano [mailto:junkio@cox.net] \nSent: Friday, June 09, 2006 3:51 PM\nTo: Post, Mark K\nCc: git@vger.kernel.org\nSubject: Re: Git-daemon messing up permissions for gitweb\n\n\"Post, Mark K\" <mark.post@eds.com> writes:\n\n> I'm trying to set up a git repository for mainframe Linux developers\nto\n> use at git390.osdl.marist.edu.  Everything _seemed_ to go well, until\n> Martin Schwidefsky started actually pushing changes back to the\n> repository.  When he does that, the projects disappear from the web\npage\n> that gitweb.cgi is generating.\n\n> As far as I can tell, the problem is happening because these files are\n> being written out with file permissions of 640, and since Apache is\n> running as user wwwrun, it can't read them:\n> -rw-r-----  1 sky git  5490 Jun  9 03:35 ./linux-2.6.git/info/refs\n> -rw-r-----  1 sky git    54 Jun  9 03:35\n> ./linux-2.6.git/objects/info/packs\n> -rw-r-----  1 sky git    41 Jun  9 03:35\n\nFirst of all, it is not git-daemon that is updating these refs.\nThe daemon is a read only facility.\n\nAnd you have checked the suggestion by Linus to set the umask to\nworld readable, which brings me to the next question.  \n\nHow did Martin actually \"push changes back\"?\n\nWas it over git protocol over SSH, or the webdav thing over http\npush?  The comment by Linus is about the former and I do not\nknow offhand who webdav thing runs as or how it handles the\npermissino bits.\n\nIt could be that your ssh daemon installation bypasses .bashrc\nand uses its own .ssh/environment, in which case your user would\nmay need to do umask there as well.\n"},{"id":"21489","messageId":"7vslmem6at.fsf@assigned-by-dhcp.cox.net","threadId":"4448","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF41050795787F@usahm236.amer.corp.eds.com","subject":"Re: Git-daemon messing up permissions for gitweb","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-09T20:18:34Z","receivedAt":"2006-06-09T20:18:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Post, Mark K\" <mark.post@eds.com> writes:\n\n> Martin is using git over SSH.  I have git-shell in /etc/passwd for his\n> account.\n\nAh, then umask git-shell gets from sshd is too restrictive.\nLoosen it and you will be fine.\n"},{"id":"21490","messageId":"Pine.LNX.4.64.0606091321100.5498@g5.osdl.org","threadId":"4448","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF41050795787F@usahm236.amer.corp.eds.com","subject":"RE: Git-daemon messing up permissions for gitweb","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-06-09T20:22:18Z","receivedAt":"2006-06-09T20:22:18Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 9 Jun 2006, Post, Mark K wrote:\n>\n> Martin is using git over SSH.  I have git-shell in /etc/passwd for his\n> account.\n\nAhh. git-shell doesn't read .bashrc or anything like that.\n\nDoes adding a \"umask(0022)\" to the beginning of main() in shell.c fix it \nfor you?\n\n\t\tLinus\n"},{"id":"21492","messageId":"7vodx2m5jp.fsf@assigned-by-dhcp.cox.net","threadId":"4448","inReplyTo":"Pine.LNX.4.64.0606091321100.5498@g5.osdl.org","subject":"Re: Git-daemon messing up permissions for gitweb","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-09T20:34:50Z","receivedAt":"2006-06-09T20:34:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Fri, 9 Jun 2006, Post, Mark K wrote:\n>>\n>> Martin is using git over SSH.  I have git-shell in /etc/passwd for his\n>> account.\n>\n> Ahh. git-shell doesn't read .bashrc or anything like that.\n\nBut that should be tweakable by configuring what sshd does for\nthe user, shouldn't it?  The \"LOGIN PROCESS\" section from man\nsshd(8) seems to talk about $HOME/.ssh/environment, for example.\n"},{"id":"21494","messageId":"Pine.LNX.4.64.0606091344010.5498@g5.osdl.org","threadId":"4448","inReplyTo":"7vodx2m5jp.fsf@assigned-by-dhcp.cox.net","subject":"Re: Git-daemon messing up permissions for gitweb","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-06-09T20:44:24Z","receivedAt":"2006-06-09T20:44:24Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 9 Jun 2006, Junio C Hamano wrote:\n>\n> But that should be tweakable by configuring what sshd does for\n> the user, shouldn't it?  The \"LOGIN PROCESS\" section from man\n> sshd(8) seems to talk about $HOME/.ssh/environment, for example.\n\nYeah. That's probably the right place to set things up.\n\n\t\tLinus\n"},{"id":"21499","messageId":"e6cnk2$s49$1@sea.gmane.org","threadId":"4448","inReplyTo":"Pine.LNX.4.64.0606091344010.5498@g5.osdl.org","subject":"Re: Git-daemon messing up permissions for gitweb","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-09T21:02:03Z","receivedAt":"2006-06-09T21:02:03Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"I've put proposed solution in GitWiki:\n\n  http://git.or.cz/gitwiki/GitFaq#git-push-ssh-umask\n\n-- \nJakub Narebski\nWarsaw, Poland\n"}]}