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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to