0

I'm on Debian 8 and not sure what I have done as whenever I try and send an email using Roundcube it says there was an error sending the message, so I checked the logs and found:

postfix/sendmail[22146]: fatal: open /etc/postfix/main.cf: Permission denied

Everything was working a couple of days ago and I have not changed anything since, not even installed updates.

So I tried:

sudo chown root:root /etc/postfix/main.cf
sudo chmod 0644 /etc/postfix/main.cf

Still no luck after restarting both Postfix and Dovecot :(

When using ls to view permissions:

-rw-r--r-- 1 root root 2363 Jun  3 23:32 /etc/postfix/main.cf

What do I do?

UPDATE:

Here are my permissions for /etc/postfix

drwxr-x---   3 root root  4096 May 30 19:44 .
drwxr-xr-x 101 root root  4096 Jun  4 00:58 ..
-rw-r-----   1 root root   329 May 30 18:08 dynamicmaps.cf
-rw-r--r--   1 root root  2367 Jun  4 00:40 main.cf
-rw-r-----   1 root root  6046 Jun  1 13:39 master.cf
-rw-r-----   1 root root   149 May 30 19:43 mysql-virtual-alias-maps.cf
-rw-r-----   1 root root   143 May 30 19:44 mysql-virtual-email2email.cf
-rw-r-----   1 root root   139 May 30 19:45 mysql-virtual-mailbox-domains.cf
-rw-r-----   1 root root   139 May 30 19:52 mysql-virtual-mailbox-maps.cf
-rwxr-x---   1 root root 28047 Apr 29 17:01 post-install
-rw-r-----   1 root root 20281 Apr 29 17:01 postfix-files
-rwxr-x---   1 root root  8861 Apr 29 17:01 postfix-script
drwxr-x---   2 root root  4096 Apr 29 17:01 sasl

I found POSTFIX main.cf permission denied and tried everything there and nothing worked for my setup.

Also by running sudo service postfix status is shows that postfix is loaded from /etc/init.d/postfix but there is no directory located there? Is this normal and should it not be loaded from /etc/postfix ?

Ulio110
  • 29
  • 1
  • 7
  • Could you check to see if `selinux` is enabled? Run the command: `sestatus`. !!! Also, what user are you trying to start `postfix` as? – Tim Jun 04 '17 at 02:32
  • What are the permissions on the `/etc/postfix` directory? – jordanm Jun 04 '17 at 07:20
  • I don't think SELinux is installed, I ran `sestatus` and comes up with command not found, even with `sudo`. Again with that possible duplicate I tried everything there any nothing worked, plus that was targeted for CentOS and I am on Debian. I've updated my answer for the permission view of `/etc/postfix` – Ulio110 Jun 04 '17 at 13:31
  • When I check the processes, everything postfix related is owned by `postfix` and maybe because my postfix directory and main.cf are owned by root that is what is causing the issue? I'm not sure what the correct permission for /etc/postfix should be? – Ulio110 Jun 04 '17 at 13:43
  • Anyone going to help? I can't move on until me email server is working again :( – Ulio110 Jun 05 '17 at 13:42
  • Someone care to explain the down vote? I am using Debian and the other link is for Cent OS, none of those commands work!? – Ulio110 Jun 06 '17 at 16:51

0 Answers0