[Mailman-Users] can't call command line functions from php

Anne Ramey anne.ramey at ncmail.net
Tue Sep 19 14:48:11 CEST 2006

Mark Sapiro wrote:
> Anne Ramey wrote:
>>>> I have my php script running as a user in the mailman group, but when I
>>>> try to do:
>>>>    //add user to Admin email list
>>>>    $command = "/usr/local/mailman/bin/add_members -r ".$Filename." 
>>>> admins";
>>>>    system($command, $status);
>>>> I get a status of 1 returned to me and it doesn't add the users.  
> and:
>> My safe_mode is Off.  There are no errors in my http log and none output 
>> to the screen.  I can run other commands with system and 
>> shell_exec...just not any mailman commands.
> Are you sure you're executing the command as the mailman group?
> Try
> chmod g+s /usr/local/mailman/bin/add_members
> and see if that helps. If it does, the problem is with the group
> executing the command.
> You don't want to leave add_members as SETGID if non Mailman admins
> have shell access to your box as SETGID will allow anyone to
> successfully run the command.
Sorry for the multitude of emails, but I'm hammering on this and keep 
finding out new tidbits.  The scripts only work as mailman and root on 
this machine...it is the live server (this is the test) that can 
successfully run from the perl scripts.  So my issue is different than I 
thought.  My check_perms gives me "No problems found".  I have added a 
couple of users to the mailman group, I've tried the chmod g+s for all 
the scripts.  All to no effect.  I'm beginning to wonder if it may be a 
systems issue--something wrong with the way it's handling group permissions.


More information about the Mailman-Users mailing list