You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Paul Gardiner <li...@glidos.net> on 2018/06/15 15:19:49 UTC

[users@httpd] gitweb permission problems with new install

openSUSE Leap 42.3, Apache 2.4.23:
   I have gitweb working just fine.

openSUSE Leap 15.0, Apache 2.4.33:
   gitweb cannot access my git repository
   Shows error: "gitweb.cgi: Can't opendir(/export/git): Permission 
denied: /usr/share/gitweb/gitweb.cgi"


I've searched through the apache config and can find no differences, 
other than on 42.3 user wwwrun has group www, whereas on 15.0 it has 
group wwwrun and is also a member of www. /export/git has group www. 
I've tried changing it to wwwrun. That changes the error to: 
"gitweb.cgi: Can't cd to /export/git: Permission denied: 
/usr/share/gitweb/gitweb.cgi"

I'm loading exactly the same set of apache modules, other than one uses 
php5 and the other php7 (gitweb.cgi is written in perl).

Leap 15.0 includes apparmor, but I see no messages from it. I've tried 
stopping apparmor to no effect.

Can anyone suggest a way to track down the cause?

Cheers,
	Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] gitweb permission problems with new install

Posted by Bill Vance <pr...@xpresso.seaslug.org>.

I'm not sure about the status of gitlab, or gitweb, et al,
but the problem might be that github was just purhased by
Microsoft.

Bill

On Sat, 16 Jun 2018, Paul Gardiner wrote:

> On 15/06/2018 16:19, Paul Gardiner wrote:
>
>> openSUSE Leap 42.3, Apache 2.4.23:
>>   I have gitweb working just fine.
>> 
>> openSUSE Leap 15.0, Apache 2.4.33:
>>   gitweb cannot access my git repository
>>   Shows error: "gitweb.cgi: Can't opendir(/export/git): 
>> Permission denied: /usr/share/gitweb/gitweb.cgi"
>> 
>> 
>> I've searched through the apache config and can find no 
>> differences, other than on 42.3 user wwwrun has group www, 
>> whereas on 15.0 it has group wwwrun and is also a member of 
>> www. /export/git has group www. I've tried changing it to 
>> wwwrun. That changes the error to: "gitweb.cgi: Can't cd to 
>> /export/git: Permission denied: 
>> /usr/share/gitweb/gitweb.cgi"
>> 
>> I'm loading exactly the same set of apache modules, other 
>> than one uses php5 and the other php7 (gitweb.cgi is written 
>> in perl).
>> 
>> Leap 15.0 includes apparmor, but I see no messages from it. 
>> I've tried stopping apparmor to no effect.
>> 
>> Can anyone suggest a way to track down the cause?
>
> It was caused by apparmor. I needed to edit the file 
> /etc/apparmor.d/usr.share.git-web.gitweb.cgi. There were two 
> lines
>
>  /srv/git/ r,
>  /srv/git/** r,
>
> I needed to edit those to match my repo root.
>
> I realise this isn't really an apache issue, but having asked 
> the question, I thought it worth posting the fix in case 
> someone with the same problem happens across my question.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Re: [users@httpd] gitweb permission problems with new install

Posted by Paul Gardiner <li...@glidos.net>.
On 15/06/2018 16:19, Paul Gardiner wrote:

> openSUSE Leap 42.3, Apache 2.4.23:
>   I have gitweb working just fine.
>
> openSUSE Leap 15.0, Apache 2.4.33:
>   gitweb cannot access my git repository
>   Shows error: "gitweb.cgi: Can't opendir(/export/git): Permission 
> denied: /usr/share/gitweb/gitweb.cgi"
>
>
> I've searched through the apache config and can find no differences, 
> other than on 42.3 user wwwrun has group www, whereas on 15.0 it has 
> group wwwrun and is also a member of www. /export/git has group www. 
> I've tried changing it to wwwrun. That changes the error to: 
> "gitweb.cgi: Can't cd to /export/git: Permission denied: 
> /usr/share/gitweb/gitweb.cgi"
>
> I'm loading exactly the same set of apache modules, other than one 
> uses php5 and the other php7 (gitweb.cgi is written in perl).
>
> Leap 15.0 includes apparmor, but I see no messages from it. I've tried 
> stopping apparmor to no effect.
>
> Can anyone suggest a way to track down the cause?

It was caused by apparmor. I needed to edit the file 
/etc/apparmor.d/usr.share.git-web.gitweb.cgi. There were two lines

  /srv/git/ r,
  /srv/git/** r,

I needed to edit those to match my repo root.

I realise this isn't really an apache issue, but having asked the 
question, I thought it worth posting the fix in case someone with the 
same problem happens across my question.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org