
Hi Mailman-users,
It would be really appreciated if any one of you can help me to overcome with problem
My Mailman is running with version 2.1.12.
I am getting "Mailman CGI error!!!" while clicking on search button which points to "http://mymailman.com/mailman/mmsearch/testlist"
[cid:image001.png@01D04D29.4D018ED0]
Mailman CGI error!!! The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: Group mismatch error. Mailman expected the CGI wrapper script to be executed as group "apache", but the system's web server executed the CGI script as group "mailman". Try tweaking the web server to run the script as group "apache", or re-run configure, providing the command line option `--with-cgi-gid=mailman'.
I checked the gid of apache and mailman is the member of apache.
[root@host]# su apache bash-4.1$ id uid=48(apache) gid=48(apache) groups=48(apache) bash-4.1$ python Python 2.6.9 (unknown, Sep 13 2014, 00:25:11) [GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import grp, os, sys os.getgid() 48 grp.getgrgid(os.getgid()) grp.struct_group(gr_name='apache', gr_passwd='x', gr_gid=48, gr_mem=['mailman'])
There are the files in /usr/local/mailman/cgi-bin/
ls -ll /usr/local/mailman/cgi-bin/ total 312 -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 admin -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 admindb -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 confirm -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 create -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 edithtml -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 htdig -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 listinfo -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 mmsearch -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 options -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 private -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 rmlist -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 roster -rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 subscribe

On 02/20/2015 03:00 AM, Kumar Pradeep (Ops) wrote:
Hi Mailman-users,
It would be really appreciated if any one of you can help me to overcome with problem
My Mailman is running with version 2.1.12.
I am getting "Mailman CGI error!!!" while clicking on search button which points to "http://mymailman.com/mailman/mmsearch/testlist"
This error is explained mor fully in the FAQ at <http://wiki.list.org/x/4030645>
Mailman CGI error!!! The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: Group mismatch error. Mailman expected the CGI wrapper script to be executed as group "apache", but the system's web server executed the CGI script as group "mailman". Try tweaking the web server to run the script as group "apache", or re-run configure, providing the command line option `--with-cgi-gid=mailman'.
I checked the gid of apache and mailman is the member of apache.
That's irrelevant. The message is telling you that the wrapper at /usr/local/mailman/cgi-bin/mmsearch (and probably all the others - do you get this error on any of Mailman's CGIs or just when you do an archive search?) has been compiled to expect to be invoked by the web server running as group 'apache', but the web server is invoking it as group 'mailman'.
In any case, the actual effective grout under which the CGI runs is 'mailman' because the wrappers are all SETGID and group 'mailman'.
It seems you may have something like
Group mailman
in your apache config. To make Mailman CGIs work, you need to either set the Group in apache to 'apache' or re run Mailman's configure and make install with the --with-cgi-gid=mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Mark,
As you have asked this question "- do you get this error on any of Mailman's CGIs or just when you do an archive search?"
Ans: Yes I get the "Mailman CGI error!!!" when I do an archive search.
When I changed the permission of mmsearch in /usr/local/mailman/cgi-bin/ , I got below error as a Bug.
from
-rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 mmsearch
To
-rwxr-xr-x 1 root apache 23096 Jan 8 02:30 mmsearch
And tried to access http://maymailman.net/mailman/mmsearch/testlist ( just when I do an archive search)
"Bug in Mailman version 2.1.12
We're sorry, we hit a bug!
Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs.
"
Can you please suggest the current stable version on Mailman?
Thanks
Pradeep
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+pradkumar=pulsesecure.net@python.org] On Behalf Of Mark Sapiro Sent: Friday, February 20, 2015 11:14 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] Mailman CGI error
On 02/20/2015 03:00 AM, Kumar Pradeep (Ops) wrote:
Hi Mailman-users,
It would be really appreciated if any one of you can help me to
overcome with problem
My Mailman is running with version 2.1.12.
I am getting "Mailman CGI error!!!" while clicking on search button which points to "http://mymailman.com/mailman/mmsearch/testlist"
This error is explained mor fully in the FAQ at <http://wiki.list.org/x/4030645>
Mailman CGI error!!!
The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog:
Group mismatch error. Mailman expected the CGI wrapper script to be
executed as group "apache", but the system's web server executed the
CGI script as group "mailman". Try tweaking the web server to run the
script as group "apache", or re-run configure, providing the command
line option `--with-cgi-gid=mailman'.
I checked the gid of apache and mailman is the member of apache.
That's irrelevant. The message is telling you that the wrapper at /usr/local/mailman/cgi-bin/mmsearch (and probably all the others - do you get this error on any of Mailman's CGIs or just when you do an archive search?) has been compiled to expect to be invoked by the web server running as group 'apache', but the web server is invoking it as group 'mailman'.
In any case, the actual effective grout under which the CGI runs is 'mailman' because the wrappers are all SETGID and group 'mailman'.
It seems you may have something like
Group mailman
in your apache config. To make Mailman CGIs work, you need to either set the Group in apache to 'apache' or re run Mailman's configure and make install with the --with-cgi-gid=mailman.
--
Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org<mailto:Mailman-Users@python.org> https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: https://mail.python.org/mailman/options/mailman-users/pradkumar%40pulsesecur...

On 02/23/2015 01:38 AM, Kumar Pradeep (Ops) wrote:
As you have asked this question “- do you get this error on any of Mailman's CGIs or just when you do an archive search?”
Ans: Yes I get the “Mailman CGI error!!!” when I do an archive search.
That is not the answer to the question I asked. I know you get the error on an archive search. What I am asking is do you get the same group mismatch error when visiting other Mailman CGI URLs such as http://mymailman.com/mailman/listinfo/testlist or http://mymailman.com/mailman/admin/testlist?
When I changed the permission of mmsearch in /usr/local/mailman/cgi-bin/ , I got below error as a Bug.
from
-rwxr-sr-x 1 root mailman 23096 Jan 8 02:30 mmsearch
To
-rwxr-xr-x 1 root apache 23096 Jan 8 02:30 mmsearch
This is because all the wrappers in /usr/local/mailman/cgi-bin/ must be in Mailman's group and SETGID. I.e. the original group and permissions were correct, the changed ones are wrong. This is not the cause of your group mismatch error.
Can you please suggest the current stable version on Mailman?
Mailman 2.1.19rc3 is fairly stable. 2.1.19 final will be released within a week. See <http://www.list.org/>.
Note that you are using Richard Barrett's archive search patches. There is a set of these for Mailman 2.1.18-1 at <http://www.msapiro.net/mm/index_htdig.patch.2.1.18> (mirrored at <http://fog.ccsf.edu/~msapiro/mm/index_htdig.patch.2.1.18>). When 2.1.19 final is released, a 2.1.19 version of the patches will be put in the same directories.
Also, please read <http://wiki.list.org/x/4030645> for more understanding of group mismatch errors.
After you restore the group and permissions on /usr/local/mailman/cgi-bin/mmsearch, what are the results of
sudo -u apache /usr/local/mailman/cgi-bin/mmsearch
and
sudo -u mailman /usr/local/mailman/cgi-bin/mmsearch
Based on what you have posted so far, I think that running the command as 'apache' will produce a 'we hit a bug' message and running the command as 'mailman' will produce a group mismatch error. Is this the case? If not, what do you see?
Also try it replacing 'mmsearch' with 'listinfo' and report those results.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Mark,
I am getting this in /var/log/httpd/access_log when calling " http://lists.pulsesecure.net/mailman/mmsearch/testlist/"
64.60.254.166 - - [27/Feb/2015:14:28:06 +0000] "POST /mailman/mmsearch/testlist HTTP/1.1" 200 511 "http://lists.pulsesecure.net/mailman/private/testlist/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
At the same time
I am getting this cgi-error in /var/log/httpd/error_log when calling " http://lists.pulsesecure.net/mailman/mmsearch/testlist/"
[Fri Feb 27 14:28:06.722345 2015] [cgi:error] [pid 1202] [client 64.60.254.166:53401] AH01215: /usr/local/mailman/Mailman/Cgi/mmsearch.py:45: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module., referer: http://lists.pulsesecure.net/mailman/private/testlist/
I checked in /usr/local/mailman/Mailman/Cgi/mmsearch.py 's 45th line it says "import popen2"
Here is the python version.
python --version Python 2.6.9
In Mailman Error Log
tail -f /usr/local/mailman/logs/error admin(2092): REQUEST_SCHEME: http admin(2092): CONTENT_TYPE: application/x-www-form-urlencoded admin(2092): HTTP_ACCEPT_ENCODING: gzip, deflate Feb 27 14:20:01 2015 (2095) htsearch for list: testlist, existatus: 2 Feb 27 14:20:55 2015 (2101) htsearch for list: testlist, existatus: 2 Feb 27 14:23:15 2015 (2108) htsearch for list: testlist, existatus: 2 Feb 27 14:23:54 2015 (2110) htsearch for list: testlist, existatus: 2 Feb 27 14:26:16 2015 (2114) htsearch for list: testlist, existatus: 2 Feb 27 14:26:32 2015 (2116) htsearch for list: testlist, existatus: 2 Feb 27 14:28:06 2015 (2121) htsearch for list: testlist, existatus: 2
Thanks Pradeep
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+pradkumar=pulsesecure.net@python.org] On Behalf Of Mark Sapiro Sent: Friday, February 20, 2015 11:14 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] Mailman CGI error
On 02/20/2015 03:00 AM, Kumar Pradeep (Ops) wrote:
Hi Mailman-users,
It would be really appreciated if any one of you can help me to overcome with problem
My Mailman is running with version 2.1.12.
I am getting "Mailman CGI error!!!" while clicking on search button which points to "http://mymailman.com/mailman/mmsearch/testlist"
This error is explained mor fully in the FAQ at <http://wiki.list.org/x/4030645>
Mailman CGI error!!! The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: Group mismatch error. Mailman expected the CGI wrapper script to be executed as group "apache", but the system's web server executed the CGI script as group "mailman". Try tweaking the web server to run the script as group "apache", or re-run configure, providing the command line option `--with-cgi-gid=mailman'.
I checked the gid of apache and mailman is the member of apache.
That's irrelevant. The message is telling you that the wrapper at /usr/local/mailman/cgi-bin/mmsearch (and probably all the others - do you get this error on any of Mailman's CGIs or just when you do an archive search?) has been compiled to expect to be invoked by the web server running as group 'apache', but the web server is invoking it as group 'mailman'.
In any case, the actual effective grout under which the CGI runs is 'mailman' because the wrappers are all SETGID and group 'mailman'.
It seems you may have something like
Group mailman
in your apache config. To make Mailman CGIs work, you need to either set the Group in apache to 'apache' or re run Mailman's configure and make install with the --with-cgi-gid=mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/pradkumar%40pulsesecur...

On 02/27/2015 06:43 AM, Kumar Pradeep (Ops) wrote:
I am getting this cgi-error in /var/log/httpd/error_log when calling " http://lists.pulsesecure.net/mailman/mmsearch/testlist/"
[Fri Feb 27 14:28:06.722345 2015] [cgi:error] [pid 1202] [client 64.60.254.166:53401] AH01215: /usr/local/mailman/Mailman/Cgi/mmsearch.py:45: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module., referer: http://lists.pulsesecure.net/mailman/private/testlist/
I checked in /usr/local/mailman/Mailman/Cgi/mmsearch.py 's 45th line it says "import popen2"
The good news is you appear finally to have gotten past your group mismatch error.
So you are using some version of the third party mmsearch module that uses the popen2 function which is deprecated since Python 2.6.
Richard Barrett's original patch at <http://openinfo.co.uk/mm/patches/444884/htdig-2.1.12-0.1.patch.gz> does import popen2 at line 45 of mmsearch.py, but my versions of these patches for Mailman 2.1.12 and subsequent versions at <http://www.msapiro.net/mm/> use subprocess.Popen.
However, the deprecation warning is only a warning. It should cause no visible problems other than the DeprecationWarning message in the http error_log.
In Mailman Error Log
tail -f /usr/local/mailman/logs/error admin(2092): REQUEST_SCHEME: http admin(2092): CONTENT_TYPE: application/x-www-form-urlencoded admin(2092): HTTP_ACCEPT_ENCODING: gzip, deflate Feb 27 14:20:01 2015 (2095) htsearch for list: testlist, existatus: 2 Feb 27 14:20:55 2015 (2101) htsearch for list: testlist, existatus: 2 Feb 27 14:23:15 2015 (2108) htsearch for list: testlist, existatus: 2 Feb 27 14:23:54 2015 (2110) htsearch for list: testlist, existatus: 2 Feb 27 14:26:16 2015 (2114) htsearch for list: testlist, existatus: 2 Feb 27 14:26:32 2015 (2116) htsearch for list: testlist, existatus: 2 Feb 27 14:28:06 2015 (2121) htsearch for list: testlist, existatus: 2
This is a different problem. It is not directly related to the use of popen2. An exit status of 2 is ENOENT No such file or directory.
The code at that point has tried to pipe some data to the command defined in the Defaults.py/mm_cfg.py parameter HTDIG_HTSEARCH_PATH which is supposed to point to a working htsearch command and apparently doesn't.
Have you installed ht://Dig? Have you set HTDIG_HTSEARCH_PATH in mm_cfg.py to point to the location of the htsearch command?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Kumar Pradeep (Ops)
-
Mark Sapiro