There are various reason to have messages like The error was:
Mailman CGI error!!! This entry is being stored in your syslog: Failure to exec script. WANTED gid 502, GOT gid 48. (Reconfigure to take 48?)
Below are possible solutions
Mailman CGI error!!! This entry is being stored in your syslog: Failure to exec script. WANTED gid 502, GOT gid 48. (Reconfigure to take 48?)
In Installing Mailman said:
./configure --with-cgi-gid=48gid 502 is
www
.
apache
However, rebuilding with --with-cgi-gid=48
does not solve the problem.
https://www.redhat.com/support/resources/faqs/RH-apache-FAQ/misc/suexec.html
Verify that /usr/sbin/suexec has permissions set to 4711. When these are properly set you will see something like this in your error log at startup: [Sun Oct 3 03:56:39 1999] [notice] Red Hat Secure/3.0 (Unix) DAV/0.9.8 mod_perl/1.19 PHP/3.0.9 configured -- resuming normal operations [Sun Oct 3 03:56:39 1999] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)Indeed, after I did
chmod 4711 /usr/sbin/suexec /etc/init.d/httpd restartthen /usr/local/apache/logs/error_log had:
[Tue Oct 16 14:10:40 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
See https://httpd.apache.org/docs/2.2/suexec.html
In the end, the issue was that:
/home/mailman_6/cgi-bin/admin
need to be
copied to /var/www/mailman_6/cgi-bin
.
This is because suexec -V
has the docroot
as /var/www
.
[root@moog cgi-bin]# suexec -V -D AP_DOC_ROOT="/var/www" -D AP_GID_MIN=100 -D AP_HTTPD_USER="apache" -D AP_LOG_EXEC="/var/log/httpd/suexec.log" -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin" -D AP_UID_MIN=500 -D AP_USERDIR_SUFFIX="public_html"
[root@moog cgi-bin]# ls -ld /var/www/mailman_6/cgi-bin drwxr-xr-x 2 www www 4096 Oct 16 14:31 /var/www/mailman_6/cgi-bin [root@moog cgi-bin]# ls -ld /var/www/mailman_6/cgi-bin/admin -rwxr-xr-x 1 www www 19082 Oct 16 14:55 /var/www/mailman_6/cgi-bin/admin
httpd-vhosts.conf
needs to have
the following for each VirtualHost
SuexecUserGroup www www
/etc/passwd
and /etc/group
need to be updated so
that the www gid is greater than 100 and the uid is greater than 500.
httpd-vhosts.conf
and comment out
SuexecUserGroup
and change
#ScriptAlias /mailman/ "/var/www/mailman_6/cgi-bin/" ScriptAlias /mailman/ "/home/mailman_6/cgi-bin/
chmod o-x /usr/sbin/suexec /etc/init.d/httpd restartCheck
error_log
that suexec is not enabled.
cd /root/tools/mailman-2.0.13 make clean ./configure --prefix=/home/mailman_6 --with-cgi-gid=apache --with-python=/usr/local/bin/python25 make install
[root@moog mailman-2.0.13]# ls -l /home/mailman_6/cgi-bin/admin -rwxr-sr-x 1 root www 19082 Oct 16 16:02 /home/mailman_6/cgi-bin/admin
See What do I change after changing the uid or gid?
In May, 2014, after changing from apache
uid to webuser
uid, we started to get:
Mailman CGI error!!! This entry is being stored in your syslog: Failure to exec script. WANTED gid 48, GOT gid 412. (Reconfigure to take 412?)
After reviewing the above, the thing to do seemed to be to rebuild the setguid files in cgi-bin, see /home/www/php/mailman/fixmailman
.