clintonm9
asked on
Title: Sendmail error, Linux. WARNING: RunAsGid for MSP ignored, check group ids (egid=500, want=51) can not chdir(/var/spool/clientmqueue/): Permission denied
I am using perl to send mail from the web. Httpd's is ran as the user Office.
When I hit a script it reports this error:
WARNING: RunAsGid for MSP ignored, check group ids (egid=500, want=51) can not chdir(/var/spool/clientmqu eue/): Permission denied
Look for yourself: http://www.jacksonsorchard.com/email_test.cgi
I can change the permission of /var/spool/clientmqueue dir to the account "chown office.office" and it will send the email, but still give part of the error, WARNING: RunAsGid for MSP ignored, check group ids (egid=500, want=51)
drwxrwx--- 2 smmsp smmsp 4096 Sep 17 11:55 clientmqueu
Please help!
Linux Red Hat 9.0
When I hit a script it reports this error:
WARNING: RunAsGid for MSP ignored, check group ids (egid=500, want=51) can not chdir(/var/spool/clientmqu
Look for yourself: http://www.jacksonsorchard.com/email_test.cgi
I can change the permission of /var/spool/clientmqueue dir to the account "chown office.office" and it will send the email, but still give part of the error, WARNING: RunAsGid for MSP ignored, check group ids (egid=500, want=51)
drwxrwx--- 2 smmsp smmsp 4096 Sep 17 11:55 clientmqueu
Please help!
Linux Red Hat 9.0
What dose the perl code that submitts the mail look like?
The directory /var/spool/clientmqueue should be created to hold the mail queue. This directory should be mode 770 and owned by user smmsp, group smmsp.
I got the above message at sendmail.org http://www.sendmail.org/~ca/email/doc8.12/op-sh-1.html
So even you change to office:office, it will change back to smmsp:smmsp and give you the error afer mail send
Hope this info can help :)
I got the above message at sendmail.org http://www.sendmail.org/~ca/email/doc8.12/op-sh-1.html
So even you change to office:office, it will change back to smmsp:smmsp and give you the error afer mail send
Hope this info can help :)
ASKER
drwxrwx--- 2 smmsp smmsp 4096 Sep 19 11:55 clientmqueue
#!/usr/bin/perl
print "P3P: CP=\"NOI DSP COR CURa ADMa DEVa TAIa OUR IND UNI COM NAV INT\"\n";
print "Content-type: text/html\n\n";
print "Sending email...<br>";
$in{'email'} = "clinton\@hitcents.com";
open(MAILER, "|/usr/lib/sendmail $in{'email'}") || die "Error: can not open mail pipe.\n";
print MAILER "To: $in{'fremail'}\n";
print MAILER "From: $in{'youremail'}\n";
print MAILER "Subject: Jackson's Orchard\n\n";
print MAILER "Hey $in{'frname'},\n\nCheck out this product I just found on Jackonsorchard.com. \nhttp://www.jacksonsorchard.com/item.cgi?cat=$in{'cat'}&num=$in{'num'}\n \n$in{'per sonal'}\n\ nThanks $in{'yourname'}";
close MAILER;
exit;
Stills ame error
#!/usr/bin/perl
print "P3P: CP=\"NOI DSP COR CURa ADMa DEVa TAIa OUR IND UNI COM NAV INT\"\n";
print "Content-type: text/html\n\n";
print "Sending email...<br>";
$in{'email'} = "clinton\@hitcents.com";
open(MAILER, "|/usr/lib/sendmail $in{'email'}") || die "Error: can not open mail pipe.\n";
print MAILER "To: $in{'fremail'}\n";
print MAILER "From: $in{'youremail'}\n";
print MAILER "Subject: Jackson's Orchard\n\n";
print MAILER "Hey $in{'frname'},\n\nCheck out this product I just found on Jackonsorchard.com. \nhttp://www.jacksonsorchard.com/item.cgi?cat=$in{'cat'}&num=$in{'num'}\n
close MAILER;
exit;
Stills ame error
Having tried your code on a RedHat 9 box, suitably modified to mail the message to my self, I don't get that error. So I'm wondering if this might be a mail config issue. You could get that error if you've changed the definition of the smmsp user in /etc/mail/submit.cf or via an option in the startup of the MSP agent. From the compile of sendmail the MSP must be run as the smmsp user (UID=51).
ASKER
I need help to fix it!
Anyone know how?
Anyone know how?
Let's see if we can figure out what's going on... I'd like to see:
1) The output from 'grep smmsp /etc/passwd'
2) The output from 'grep office /etc/passwd'
3) The contents of /etc/group
4) The contents of /etc/sysconfig/sendmail
5) The output of 'ls -l /etc/init.d/sendmail'
6) The output from 'grep RunAs /etc/mail/*.cf'
7) The output of 'rpm -q sendmail'
That ought to do for starters.
1) The output from 'grep smmsp /etc/passwd'
2) The output from 'grep office /etc/passwd'
3) The contents of /etc/group
4) The contents of /etc/sysconfig/sendmail
5) The output of 'ls -l /etc/init.d/sendmail'
6) The output from 'grep RunAs /etc/mail/*.cf'
7) The output of 'rpm -q sendmail'
That ought to do for starters.
ASKER
1) smmsp:x:51:51::/var/spool/ mqueue:/sb in/nologin
2) office:x:500:500::/home/of fice:/bin/ bash
3) root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
games:x:20:
gopher:x:30:
dip:x:40:
ftp:x:50:
lock:x:54:
nobody:x:99:
users:x:100:
rpm:x:37:
floppy:x:19:
vcsa:x:69:
utmp:x:22:
nscd:x:28:
slocate:x:21:
sshd:x:74:
rpc:x:32:
rpcuser:x:29:
nfsnobody:x:65534:
mailnull:x:47:
smmsp:x:51:
pcap:x:77:
apache:x:48:
squid:x:23:
webalizer:x:67:
xfs:x:43:
named:x:25:
ntp:x:38:
mailman:x:41:
office:x:500:
rich:x:501:
richssh:x:502:
scott:x:503:
clinton:x:504:
support:x:505:
support_kenny:x:506:
drew:x:507:
scottssh:x:508:
ftpsecure:x:509:
wuhusupport:x:510:
icecast:x:511:
data:x:512:
data_sec123:x:513:
sjames:x:514:
4) DAEMON=yes
QUEUE=1h
5) -rwxr-xr-x 1 root root 2444 Aug 26 07:02 /etc/init.d/sendmail
6) /etc/mail/sendmail.cf:#O RunAsUser=sendmail
/etc/mail/submit.cf:O RunAsUser=smmsp
7) sendmail-8.12.8-6.90
2) office:x:500:500::/home/of
3) root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
games:x:20:
gopher:x:30:
dip:x:40:
ftp:x:50:
lock:x:54:
nobody:x:99:
users:x:100:
rpm:x:37:
floppy:x:19:
vcsa:x:69:
utmp:x:22:
nscd:x:28:
slocate:x:21:
sshd:x:74:
rpc:x:32:
rpcuser:x:29:
nfsnobody:x:65534:
mailnull:x:47:
smmsp:x:51:
pcap:x:77:
apache:x:48:
squid:x:23:
webalizer:x:67:
xfs:x:43:
named:x:25:
ntp:x:38:
mailman:x:41:
office:x:500:
rich:x:501:
richssh:x:502:
scott:x:503:
clinton:x:504:
support:x:505:
support_kenny:x:506:
drew:x:507:
scottssh:x:508:
ftpsecure:x:509:
wuhusupport:x:510:
icecast:x:511:
data:x:512:
data_sec123:x:513:
sjames:x:514:
4) DAEMON=yes
QUEUE=1h
5) -rwxr-xr-x 1 root root 2444 Aug 26 07:02 /etc/init.d/sendmail
6) /etc/mail/sendmail.cf:#O RunAsUser=sendmail
/etc/mail/submit.cf:O RunAsUser=smmsp
7) sendmail-8.12.8-6.90
Okay, all of that looks correct. What does 'ls -l /usr/lib/sendmail' show?
chown root.smmsp /usr/sbin/sendmail
(Or /usr/lib/sendmail dedpending on the distro)
(Or /usr/lib/sendmail dedpending on the distro)
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - no points refunded
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
paullamhkg
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - no points refunded
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
paullamhkg
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.