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

Leave a Comment

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

Hire a server Expert to resolve the issue Now.

Hire a server Expert to resolve the issue Now.

Resolve this issue in just 5$ from https://serverexpert.io

 

You have Successfully Subscribed!

Open chat