Page 1 of 1

Dovecot ssl_key Permission denied

Posted: 2020/03/08 16:45:35
by Stripies
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.

Re: Dovecot ssl_key Permission denied

Posted: 2020/03/08 17:03:38
by TrevorH
restorecon -RFv /etc/pki/dovecot/private/dovecot.pem

Re: Dovecot ssl_key Permission denied

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

Re: Dovecot ssl_key Permission denied

Posted: 2020/03/09 04:03:26
by afewgoodman
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.

Re: Dovecot ssl_key Permission denied

Posted: 2020/03/09 12:14:58
by TrevorH
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.