threads / discuss / 4448

RE: Git-daemon messing up permissions for gitweb

Subject: RE: Git-daemon messing up permissions for gitweb

## tl;dr

6 messages between Jun 9, 2006 and Jun 9, 2006.

replies: 5people: 4as markdown or json

Post, Mark K· Jun 9, 2006, 20:08 UTC · lore

Martin is using git over SSH. I have git-shell in /etc/passwd for his account.

Mark Post 
-----Original Message-----
From: Junio C Hamano [mailto:junkio@cox.net] 
Sent: Friday, June 09, 2006 3:51 PM
To: Post, Mark K
Cc: git@vger.kernel.org
Subject: Re: Git-daemon messing up permissions for gitweb
"Post, Mark K" <mark.post@eds.com> writes:
> I'm trying to set up a git repository for mainframe Linux developers
to
> use at git390.osdl.marist.edu.  Everything _seemed_ to go well, until
> Martin Schwidefsky started actually pushing changes back to the
> repository.  When he does that, the projects disappear from the web
page
> that gitweb.cgi is generating.
Show 7 quoted lines
> As far as I can tell, the problem is happening because these files are
> being written out with file permissions of 640, and since Apache is
> running as user wwwrun, it can't read them:
> -rw-r-----  1 sky git  5490 Jun  9 03:35 ./linux-2.6.git/info/refs
> -rw-r-----  1 sky git    54 Jun  9 03:35
> ./linux-2.6.git/objects/info/packs
> -rw-r-----  1 sky git    41 Jun  9 03:35

First of all, it is not git-daemon that is updating these refs. The daemon is a read only facility.

And you have checked the suggestion by Linus to set the umask to world readable, which brings me to the next question.

How did Martin actually "push changes back"?

Was it over git protocol over SSH, or the webdav thing over http push? The comment by Linus is about the former and I do not know offhand who webdav thing runs as or how it handles the permissino bits.

It could be that your ssh daemon installation bypasses .bashrc and uses its own .ssh/environment, in which case your user would may need to do umask there as well.

Junio C Hamano· Jun 9, 2006, 20:18 UTC · re: Post, Mark K · lore

Re: Git-daemon messing up permissions for gitweb

"Post, Mark K" <mark.post@eds.com> writes:
> Martin is using git over SSH.  I have git-shell in /etc/passwd for his
> account.

Ah, then umask git-shell gets from sshd is too restrictive. Loosen it and you will be fine.

Linus Torvalds· Jun 9, 2006, 20:22 UTC · re: Post, Mark K · lore
On Fri, 9 Jun 2006, Post, Mark K wrote:
>
> Martin is using git over SSH.  I have git-shell in /etc/passwd for his
> account.
Ahh. git-shell doesn't read .bashrc or anything like that.

Does adding a "umask(0022)" to the beginning of main() in shell.c fix it for you?

		Linus
Junio C Hamano· Jun 9, 2006, 20:34 UTC · re: Linus Torvalds · lore

Re: Git-daemon messing up permissions for gitweb

Linus Torvalds <torvalds@osdl.org> writes:
Show 6 quoted lines
> On Fri, 9 Jun 2006, Post, Mark K wrote:
>>
>> Martin is using git over SSH.  I have git-shell in /etc/passwd for his
>> account.
>
> Ahh. git-shell doesn't read .bashrc or anything like that.

But that should be tweakable by configuring what sshd does for the user, shouldn't it? The "LOGIN PROCESS" section from man sshd(8) seems to talk about $HOME/.ssh/environment, for example.

Linus Torvalds· Jun 9, 2006, 20:44 UTC · re: Junio C Hamano · lore

Re: Git-daemon messing up permissions for gitweb

On Fri, 9 Jun 2006, Junio C Hamano wrote:
>
> But that should be tweakable by configuring what sshd does for
> the user, shouldn't it?  The "LOGIN PROCESS" section from man
> sshd(8) seems to talk about $HOME/.ssh/environment, for example.
Yeah. That's probably the right place to set things up.
		Linus

← back to recent threads