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:

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?



Re: gitweb permission problems with new install

By Paul Gardiner at 06/16/2018 - 11:02

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.

Re: gitweb permission problems with new install

By Bill Vance at 06/18/2018 - 14:19

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