Hi all,
I'll try to post as many details as possible so people don't have to reply back thousands of times asking for more info and what the permissions are for this or that. Basically here's what happens, the mail() function in PHP doesn't work, the outgoing mail doesn't go anywhere.
The sendmail error log shows:
Code:
Sep 7 14:52:38 jusme sendmail[26105]: NOQUEUE: SYSERR(apache): can not write to queue directory /var/spool/clientmqueue/ (RunAsGid=48, required=51): Permission denied
Here are the details you should need:
Httpd is running as apache/apache.
I have added apache as part of the smmsp group in /etc/group.
Permissions for /var/spool/clientmqueue:
Code:
drwxrwx--- 2 smmsp smmsp 4096 Sep 7 14:36 clientmqueue
For some reason, even though httpd should be running as apache/apache, but apache is also part of the smmsp group, it
should have write permissions on the clientmqueue directory. If I just make the directory permissions 0777 then I get these errors in the log:
Code:
Sep 7 14:55:45 jusme sendmail[26159]: dangerous permissions=40777 on queue directory /var/spool/clientmqueue/
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: SYSERR(apache): collect: Cannot write ./dfj87LtjT9026159 (bfcommit, uid=48, gid=48): Permission denied
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: from=apache, size=39, class=0, nrcpts=1, relay=apache@localhost
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: 0: fl=0x0, mode=10600: FIFO: dev=0/7, ino=319044, nlink=1, u/gid=48/48, size=0
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: 1: fl=0x1, mode=20666: CHR: dev=0/13, ino=1989, nlink=1, u/gid=0/0, size=0
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: 2: fl=0x2, mode=20666: CHR: dev=0/12, ino=444, nlink=1, u/gid=0/0, size=0
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: 3: fl=0x2, mode=140777: SOCK localhost->[[UNIX: /dev/log]]
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: 4: fl=0x1, mode=20666: CHR: dev=0/13, ino=1989, nlink=1, u/gid=0/0, size=0
Sep 7 14:55:45 jusme sendmail[26159]: j87LtjT9026159: SYSERR(apache): queueup: cannot create queue file ./qfj87LtjT9026159, euid=48, fd=-1, fp=0x0: Permission denied
If anyone needs more info, or needs to see my submit.cf or something I can post further details. I've seen this problem posted about 100 different times on different forums but I have yet to find a solution. Most people just go "oh, I forgot to check permissions on clientmqueue, now it works!" But my permissions match the sendmail install, and also apache is part of the smmsp group as I have it configured so permissions of 770 should allow httpd running as apache/apache to write to that directory, but it can't even chdir to it. Permissions of 777 will allow httpd to chdir, but it can't write anything. It makes no sense whatsoever. I figure it probably has something to do with my submit.cf, so if someone needs to see a part of that I'll post it, but I haven't messed with it from the initial install I don't think.
Oh, also here's a snippet from my /etc/passwd and /etc/group files unless you don't believe my configuration posted above or something:
Code:
#grep smmsp /etc/passwd /etc/group
/etc/passwd:smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
/etc/group:smmsp:x:51:apache
Thanks for your replies,
Ross