Dovecot ssl_key Permission denied

Issues related to applications and software problems
Post Reply
Stripies
Posts: 3
Joined: 2018/08/28 17:55:29

Dovecot ssl_key Permission denied

Post by Stripies » 2020/03/08 16:45:35

I have Dovecot version 2.2.36 installed and here is the full error message

Code: Select all

doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 15: ssl_key: Can't open file /etc/pki/dovecot/private/dovecot.pem: Permission denied
Line 15 in 10-ssl.conf is just

Code: Select all

ssl_key = </etc/ssl/private/dovecot.pem
For ssl_key, the documentation recommends the permissions root:root 0400, which is what the permissions for dovecot.pem is set as. I do not know what would cause Dovecot to be denied permission to the file if it has root privileges while reading those files as states in the documentation.

User avatar
TrevorH
Forum Moderator
Posts: 29911
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Dovecot ssl_key Permission denied

Post by TrevorH » 2020/03/08 17:03:38

restorecon -RFv /etc/pki/dovecot/private/dovecot.pem
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Stripies
Posts: 3
Joined: 2018/08/28 17:55:29

Re: Dovecot ssl_key Permission denied

Post by Stripies » 2020/03/08 17:37:25

TrevorH wrote:
2020/03/08 17:03:38
restorecon -RFv /etc/pki/dovecot/private/dovecot.pem
Unfortunately that did not help.

afewgoodman
Posts: 97
Joined: 2019/12/11 03:51:58

Re: Dovecot ssl_key Permission denied

Post by afewgoodman » 2020/03/09 04:03:26

Hi
Dovecot would be installed in my side successfully in my trial.

(base) [bchoi@localhost dovecot]$ pwd
/etc/pki/dovecot
(base) [bchoi@localhost dovecot]$ find ./ -name *.pem
./private/dovecot.pem
./certs/dovecot.pem
(base) [bchoi@localhost dovecot]$ ll ./private/dovecot.pem
-rw-------. 1 root root 916 3월 9 13:13 ./private/dovecot.pem
(base) [bchoi@localhost dovecot]$ ll ./certs/dovecot.pem
-rw-------. 1 root root 847 3월 9 13:13 ./certs/dovecot.pem
(base) [bchoi@localhost dovecot]$ sudo netstat -nltp | grep dovecot
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 8346/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 8346/dovecot
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 8346/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 8346/dovecot
tcp6 0 0 :::993 :::* LISTEN 8346/dovecot
tcp6 0 0 :::995 :::* LISTEN 8346/dovecot
tcp6 0 0 :::110 :::* LISTEN 8346/dovecot
tcp6 0 0 :::143 :::* LISTEN 8346/dovecot
(base) [bchoi@localhost dovecot]$

BR.

User avatar
TrevorH
Forum Moderator
Posts: 29911
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Dovecot ssl_key Permission denied

Post by TrevorH » 2020/03/09 12:14:58

Check the permissions on all the directories leading down to the one containing the file. Check the file itself. Check what user the process is running as when it tries to read it.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”