当apache在linux上发送邮件时,对sendmail.cf有适当的权限

Atm*_*tma 0 linux apache sendmail

我在apache中有一个需要使用sendmail.cf的Web应用程序(bugzilla).当它尝试使用sendmail时,我收到错误:

/etc/mail/sendmail.cf:第0行:无法打开:权限被拒绝

Web应用程序在组"apache"中

sendmail的权限如下:

-rw-r - r-- 1 root root 58624 2008-03-29 05:27 sendmail.cf

sendmail.cf的权限必须是什么才能被apache访问,但仍然足够安全以锁定其他人.

小智 7

我在Centos 7中遇到了这个问题,答案就在这里:http: //www.mysysadmintips.com/linux/servers/591-sendmail-won-t-send-emails-on-centos-7-permission-denied

快速'sestatus'检查显示该问题是由SELinux引起的.

跑步:getsebool httpd_can_sendmail返回关闭,这意味着阿帕奇(httpd的)没有权限发送电子邮件.

运行:setsebool -P httpd_can_sendmail on解决了该问题