Author Topic: Can't open log file /var/log/dovecot.log: Permission denied  (Read 13724 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
I have error in maillog
 Can't open log file /var/log/dovecot.log: Permission denied

How to fix it ?

Offline
***
Re: Can't open log file /var/log/dovecot.log: Permission denied
« Reply #1 on: April 09, 2017, 12:26:01 PM »
chown vmail:mail dovecot.log

Offline
*
Re: Can't open log file /var/log/dovecot.log: Permission denied
« Reply #2 on: July 23, 2023, 11:36:15 AM »
i have the same problem

dovecot[12559]: Can't open log file /var/log/dovecot-debug.log: Permission denied

i did all that

# chmod 660 /var/log/dovecot-debug.log
# chmod g+w /var/log
# usermod -a -G dovecot dovecot
# chown vmail:mail /var/log/dovecot-debug.log


and i have the same error

Offline
****
Re: Can't open log file /var/log/dovecot.log: Permission denied
« Reply #3 on: July 23, 2023, 01:45:01 PM »
How are you trying to open the log file? If you just tail it in a root shell, you should have no trouble accessing it, so permissions don't really matter in that respect. Even the File Manager will be reading the files with root permissions from the CWP Admin panel, so you can view the log file or download it from the File Manager.

You didn't need need to do anything with the dovecot user group -- it is already in dovecot, mail, wheel. Correct permissions:
Code: [Select]
-rw-------. 1 vmail mail 2570571664 Jul 23 08:36 /var/log/dovecot-debug.log
(and that shows me I need to go add this log to logrotate, since it's 2.5GB!)