Question

I'm trying to integrate git, gitweb, gitolite, apache. For the moment I get each time a "Server Error". Apache logs:

[cgi:error] [...] AH01215: (13)Permission denied: exec of '/usr/sbin/suexec2' failed, referer: http://git/

/usr/sbin/suexec2 -V gives me:

-D AP_HTTPD_USER="wwwrun"

meaning that apache will run as user "wwwrun". The user wwwrun belongs to the group git:

git:x:1000:git,sav,tame,wwwrun

and these are the permissions of /usr/sbin/suexec2

-rwsr-x--- 1 root git 18936 Oct 24 14:19 /usr/sbin/suexec2

I have restarted Apache several times, applied newgrp... I'm out of ideas.

Was it helpful?

Solution

SOLVED but with no apparent reason.

I applied these commands several times:

newgrp
/etc/init.d/apache2 restart
log out

and for one our another reason it did not work, and now it does... I didn't change a thing... these are the last commands I did:

git:~ # sudo -u wwwrun /usr/sbin/suexec2 -V
sudo: unable to execute /usr/sbin/suexec2: Permission denied
git:~ # vim /etc/group
git:~ # vim /var/log/messages
git:~ # vim /var/log/apache2/error_log 
git:~ # ls -l /usr/sbin/suexec2
-rwsr-x--- 1 root git 18936 Oct 24 14:19 /usr/sbin/suexec2
git:~ # vim /etc/group
git:~ # cat /etc/group | grep wwwrun
git:x:1000:git,sav,tame,wwwrun
git:~ # ^C
git:~ # /etc/init.d/apache2 restart
redirecting to systemctl restart apache2
git:~ # vim /var/log/apache2/error_log 
git:~ # sudo -u wwwrun /usr/sbin/suexec2 -V

the only command that might have changed something is the apache restart, but I had done that already for many times...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top