fatal: open /etc/postfix/main.cf: Permission denied

On a CentOS server, when sending mail from PHP scripts, mail failed to work. On checking postfix log file (/var/log/maillog), i see following error.

Aug 11 01:41:53 forums postfix/sendmail[44463]: fatal: open /etc/postfix/main.cf: Permission denied

To fix this, disable selinux

setenforce 0

To permanantly disable SELinux, run

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *