【发布时间】:2012-03-14 23:56:04
【问题描述】:
除非我将 /var/spool/clientmqueue 的权限更改为 777,否则我无法让 sendmail 从 apache+php 工作。
/var/spool/clientmqueue 的所有权
drwxrwxrwx 2 smmsp mail 4096 Jul 19 11:50 clientmqueue
我弄乱了 smmsp 和 apache 的用户组。
id apache
uid=48(apache) gid=48(apache) groups=48(apache),12(mail)
id mail
uid=12(mail) gid=12(mail) groups=12(mail),48(apache)
SELinux 被禁用
getsebool httpd_can_sendmail
getsebool: SELinux is disabled
如果我将文件夹权限设置为 770,则在邮件日志中
NOQUEUE: SYSERR(apache): can not write to queue directory
/var/spool/clientmqueue/ (RunAsGid=48, required=12): Permission denied
不会发送任何邮件,我会从 php 收到错误消息。
如果我将文件夹设置为 0777,那么我会在邮件日志中得到它
dangerous permissions=40776 on queue directory /var/spool/clientmqueue/
但是 php 可以正常发送邮件。
是否有可能让它与 0770 和 apache 一起工作,并在组中读取邮件。我知道错误是获取 apache 的主 GID 48,但它也共享组 12。
任何帮助都会很棒。
【问题讨论】: