{"thread":{"id":"4446","subject":"Git-daemon messing up permissions for gitweb","startedAt":"2006-06-09T18:41:35Z","lastAt":"2006-06-09T20:01:20Z","messageCount":5,"participants":["Post, Mark K","Jakub Narebski","Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"21479","messageId":"5A14AF34CFF8AD44A44891F7C9FF41050795782F@usahm236.amer.corp.eds.com","threadId":"4446","inReplyTo":null,"subject":"Git-daemon messing up permissions for gitweb","fromName":"Post, Mark K","fromEmail":"mark.post@eds.com","sentAt":"2006-06-09T18:41:35Z","receivedAt":"2006-06-09T18:41:35Z","isPatch":false,"sender":{"key":"mark.post@eds.com","avatar":null},"body":"I'm trying to set up a git repository for mainframe Linux developers to\nuse at git390.osdl.marist.edu.  Everything _seemed_ to go well, until\nMartin Schwidefsky started actually pushing changes back to the\nrepository.  When he does that, the projects disappear from the web page\nthat gitweb.cgi is generating.\n\nAs far as I can tell, the problem is happening because these files are\nbeing written out with file permissions of 640, and since Apache is\nrunning 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./linux-2.6.git/refs/heads/master\n-rw-r-----  1 sky git    41 Jun  9 03:35\n./linux-2.6.git/refs/heads/origin\n-rw-r-----  1 sky git  5490 Jun  9 04:00\n./s390-experimental.git/info/refs\n-rw-r-----  1 sky git     1 Jun  9 04:00\n./s390-experimental.git/objects/info/packs\n-rw-r-----  1 sky git    41 Jun  9 04:00\n./s390-experimental.git/refs/heads/master\n-rw-r-----  1 sky git  5490 Jun  9 11:31 ./s390-features.git/info/refs\n-rw-r-----  1 sky git     1 Jun  9 11:31\n./s390-features.git/objects/info/packs\n-rw-r-----  1 sky git    41 Jun  9 11:31\n./s390-features.git/refs/heads/master\n-rw-r-----  1 sky git  5490 Jun  9 03:41 ./s390-fixes.git/info/refs\n-rw-r-----  1 sky git     1 Jun  9 03:41\n./s390-fixes.git/objects/info/packs\n-rw-r-----  1 sky git    41 Jun  9 03:41\n./s390-fixes.git/refs/heads/master\n\nI know I could brute-force this by adding wwwrun to the git group, but I\nfirst wanted to find out if that is the solution, or if something is\nwrong with the way I've set things up.  I tried searching the mailing\nlist archives, but nothing that appeared to be relevant turned up.\n\nThanks in advance for any help,\n\nMark Post\n"},{"id":"21480","messageId":"e6cgbo$2rm$1@sea.gmane.org","threadId":"4446","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF41050795782F@usahm236.amer.corp.eds.com","subject":"Re: Git-daemon messing up permissions for gitweb","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-09T18:58:09Z","receivedAt":"2006-06-09T18:58:09Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Post, Mark K wrote:\n\n> I'm trying to set up a git repository for mainframe Linux developers to\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 page\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\nOne of the possible soultion would be to add sky to Apache group,\nmake directory sticky-group, and make files readable by group (perhaps by\nmarking repository as shared, or something).\n\n-- \nJakub Narebski\nWarsaw, Poland\n"},{"id":"21482","messageId":"Pine.LNX.4.64.0606091201210.5498@g5.osdl.org","threadId":"4446","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF41050795782F@usahm236.amer.corp.eds.com","subject":"Re: Git-daemon messing up permissions for gitweb","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-06-09T19:05:36Z","receivedAt":"2006-06-09T19:05:36Z","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> 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\nYou can either make sure that people have something like\n\n\tumask 0022\n\nin their bashrc (or that it's the default umask), so that they do things \nworld-readably by default.\n\nOr add\n\t[core]\n\t\tSharedRepository = true\n\nto the repository config file.\n\n\t\tLinus\n"},{"id":"21485","messageId":"7v1wtynm4k.fsf@assigned-by-dhcp.cox.net","threadId":"4446","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF41050795782F@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-09T19:51:23Z","receivedAt":"2006-06-09T19:51:23Z","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> I'm trying to set up a git repository for mainframe Linux developers to\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 page\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":"21486","messageId":"7vwtbqm73j.fsf@assigned-by-dhcp.cox.net","threadId":"4446","inReplyTo":"Pine.LNX.4.64.0606091201210.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:01:20Z","receivedAt":"2006-06-09T20:01:20Z","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>> 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\n> Or add\n> \t[core]\n> \t\tSharedRepository = true\n>\n> to the repository config file.\n\nThis is about being able to share among the group, not with\npeople outside, so if wwwrun is outside git group like Mark's\nsetting I do not think it would do anything helpful to the\nsituation.\n"}]}