How to sub with a cgi script?
"Zembower, Kevin" <[email protected]>
| Newsgroups | gmane.mail.ezmlm |
|---|---|
| Message-ID | <2E8AE992B157C0409B18D0225D0B476304C576EB@XCH-VN01.sph.ad.jhsph.edu> |
I'm trying to subscribe a user to an ezmlm list from a web form
processed by a cgi script. Unfortunately, the list owner insists on my
using ezmlm-sub rather than sending a request to subscribe to the list
with the script, a system I've implemented and don't have any problems
with.
Apache, and therefore the cgi script, run as the apache:apache user and
group. I get this error when I try to subscribe a user:
[Mon Dec 18 10:31:48 2006] [error] [client 10.253.200.96] ezmlm-sub:
fatal: unable to switch to /home/ezmlmlist/hcmn.org/hcmn/: access
denied, referer: http://www.m-mc.org/hcmn/subscribe.php
Here's the lines of perl code that attempt to subscribe:
#If there is an ezmlm directory of a list in the variable
$headers{'Ezmlmlistforce'}, force-subscribe the user
#To use this section, request must have:
# email address of subscriber in field named 'email'
if ($headers{'Ezmlmlistforce'}) {
my ($email) = $query->param('email');
system("/usr/bin/ezmlm-sub $headers{'Ezmlmlistforce'} $email") or
carp;
} #If there's a ezmlm directory to force-subscribe a user to.
I've tried changing the group of all the programs in
/home/ezmlmlist/hcmn.org/hcmn to 'apache' and making them
group-writable, but this also fails.
Any suggestions on how I can make this system work? Thanks for any
advice or suggestions.
-Kevin
Kevin Zembower
Internet Services Group manager
Center for Communication Programs
Bloomberg School of Public Health
Johns Hopkins University
111 Market Place, Suite 310
Baltimore, Maryland 21202
410-659-6139