Hello !
We want to log error in a File directly : /var/log/IRV_MdM/Dovecot_main.log.
We got this error: 'Can't open log file /var/log/IRV_MdM/Dovecot_main.log: Permission denied'
Please have a look at our Problem. Is it a bug or an incorrect config ?
Our Dir-Structure is: (for testing, we changed all to mod 777) 2021-05-03 04:29:32 IRV-20210501-V02-rvh:~ # dir -d /var/ /var/log/ /var/log/IRV_MdM/ /var/log/IRV_MdM/Dovecot_main.log drwxrwxrwx 11 root root 4096 2021-04-30 20:36:51 /var/ drwxrwxrwx 21 root root 4096 2021-05-03 02:53:34 /var/log/ drwxrwxrwx 4 IRV_MdM IRV_MdMG 4096 2021-05-03 04:28:09 /var/log/IRV_MdM/ -rwxrwxrwx 1 IRV_MdM IRV_MdMG 14 2021-05-03 01:36:18 /var/log/IRV_MdM/Dovecot_main.log 2021-05-03 04:29:48 IRV-20210501-V02-rvh:~ #
Version: 2021-05-03 04:28:05 IRV-20210501-V02-rvh:~ # dovecot --version 2.3.14 (cee3cbc0d) 2021-05-03 04:28:12 IRV-20210501-V02-rvh:~ #
Logs: 2021-05-03 04:28:51 IRV-20210501-V02-rvh:~ # doveadm log find Debug: /var/log/IRV_MdM/Dovecot_main.log Info: /var/log/IRV_MdM/Dovecot_main.log Warning: /var/log/IRV_MdM/Dovecot_main.log Error: /var/log/IRV_MdM/Dovecot_main.log Fatal: /var/log/IRV_MdM/Dovecot_main.log
Config: 2021-05-03 04:45:27 IRV-20210501-V02-rvh:~ # dovecot -n # 2.3.14 (cee3cbc0d): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.14 (1b5c82b2) # OS: Linux 5.12.0-1-default x86_64 ext3 # Hostname: IRV-20210501-V02-rvh auth_cache_size = 20 M auth_debug = yes auth_debug_passwords = yes auth_verbose = yes auth_verbose_passwords = plain default_internal_user = IRV_MdM default_login_user = IRV_MdM_Login deliver_log_format = msgid=%m: %$ (From=%f, To=%t, Subject=%s, Size=%p/%w, Dsn=%{storage_id}) disable_plaintext_auth = no first_valid_uid = 10000 last_valid_gid = 49999 last_valid_uid = 49999 listen = * log_path = /var/log/IRV_MdM/Dovecot_main.log log_timestamp = "%Y-%m-%d %H:%M:%S " login_greeting = Welcome to the INetS - Multi-Device-Mail-Server. mail_access_groups = IRV_MdMG mail_debug = yes mail_location = maildir:/var/spool/IRV_MdM/User/%u/Mail:CONTROL=/var/spool/IRV_MdM/User/%u/C trl:INDEX=/var/spool/IRV_MdM/User/%u/Index:LAYOUT=fs mail_temp_dir = /var/spool/IRV_MdM/Tmp managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve } pop3_client_workarounds = outlook-no-nuls oe-ns-eoh postmaster_address = mailto:Support@IRV.at Support@IRV.at ssl_cert = /Apps_IRV/Web/Cert/IRV_star_irv_at/IRV_STAR_irv_at.Crt.crt ssl_cipher_list = ALL:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH ssl_key = # hidden, use -P to show it ssl_options = no_compression ssl_prefer_server_ciphers = yes userdb { driver = prefetch } userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } verbose_proctitle = yes 2021-05-03 04:45:42 IRV-20210501-V02-rvh:~ #
OS: 2021-05-03 04:45:42 IRV-20210501-V02-rvh:~ # i_ver Isg-Release: Version = 07.00.22 from 2021-01-22 21:13. Linux-Release: openSUSE Tumbleweed 20210430 Linux 5.12.0-1-default x86_64. 2021-05-03 05:13:01 IRV-20210501-V02-rvh:~ #
Please send the reply to Support@IRV.at.
Mit freundlichen Grüßen / with best regards
Ing. Ronald VOLF
http://www.irv.at/
IRV Datenverarbeitung GmbH
Internet: http://www.irv.at/ www.irv.at
Mail: mailto:Sales@IRV.at Sales@IRV.at
Tel.: (+43-2236) 2236 7 *
Fax: (+43-2236) 2191 7 / 30
Addr.: Brown Boveri Strasse 6, Top 18 2351 Wr. Neudorf, Austria
On 03/05/2021 06:19 Volf, Ronald (IRV) sales@irv.at wrote:
Hello! We want to log error in a File directly : /var/log/IRV_MdM/Dovecot_main.log.
We got this error: 'Can't open log file /var/log/IRV_MdM/Dovecot_main.log: Permission denied'
Please have a look at our Problem. Is it a bug or an incorrect config ?
Our Dir-Structure is: (for testing, we changed all to mod 777) 2021-05-03 04:29:32 IRV-20210501-V02-rvh:~ # dir -d /var/ /var/log/ /var/log/IRV_MdM/ /var/log/IRV_MdM/Dovecot_main.log drwxrwxrwx 11 root root 4096 2021-04-30 20:36:51 /var/ drwxrwxrwx 21 root root 4096 2021-05-03 02:53:34 /var/log/ drwxrwxrwx 4 IRV_MdM IRV_MdMG 4096 2021-05-03 04:28:09 /var/log/IRV_MdM/ -rwxrwxrwx 1 IRV_MdM IRV_MdMG 14 2021-05-03 01:36:18 /var/log/IRV_MdM/Dovecot_main.log 2021-05-03 04:29:48 IRV-20210501-V02-rvh:~ #
Version: 2021-05-03 04:28:05 IRV-20210501-V02-rvh:~ # dovecot --version 2.3.14 (cee3cbc0d) 2021-05-03 04:28:12 IRV-20210501-V02-rvh:~ #
Logs: 2021-05-03 04:28:51 IRV-20210501-V02-rvh:~ # doveadm log find Debug: /var/log/IRV_MdM/Dovecot_main.log Info: /var/log/IRV_MdM/Dovecot_main.log Warning: /var/log/IRV_MdM/Dovecot_main.log Error: /var/log/IRV_MdM/Dovecot_main.log Fatal: /var/log/IRV_MdM/Dovecot_main.log
Config: 2021-05-03 04:45:27 IRV-20210501-V02-rvh:~ # dovecot -n # 2.3.14 (cee3cbc0d): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.14 (1b5c82b2) # OS: Linux 5.12.0-1-default x86_64 ext3 # Hostname: IRV-20210501-V02-rvh auth_cache_size = 20 M auth_debug = yes auth_debug_passwords = yes auth_verbose = yes auth_verbose_passwords = plain default_internal_user = IRV_MdM default_login_user = IRV_MdM_Login deliver_log_format = msgid=%m: %$ (From=%f, To=%t, Subject=%s, Size=%p/%w, Dsn=%{storage_id}) disable_plaintext_auth = no first_valid_uid = 10000 last_valid_gid = 49999 last_valid_uid = 49999 listen = * log_path = /var/log/IRV_MdM/Dovecot_main.log log_timestamp = "%Y-%m-%d %H:%M:%S " login_greeting = Welcome to the INetS - Multi-Device-Mail-Server. mail_access_groups = IRV_MdMG mail_debug = yes mail_location = maildir:/var/spool/IRV_MdM/User/%u/Mail:CONTROL=/var/spool/IRV_MdM/User/%u/Ctrl:INDEX=/var/spool/IRV_MdM/User/%u/Index:LAYOUT=fs mail_temp_dir = /var/spool/IRV_MdM/Tmp managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve } pop3_client_workarounds = outlook-no-nuls oe-ns-eoh postmaster_address =Support@IRV.at ssl_cert = /Apps_IRV/Web/Cert/IRV_star_irv_at/IRV_STAR_irv_at.Crt.crt ssl_cipher_list = ALL:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH ssl_key = # hidden, use -P to show it ssl_options = no_compression ssl_prefer_server_ciphers = yes userdb { driver = prefetch } userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } verbose_proctitle = yes 2021-05-03 04:45:42 IRV-20210501-V02-rvh:~ #
OS: 2021-05-03 04:45:42 IRV-20210501-V02-rvh:~ # i_ver Isg-Release: Version = 07.00.22 from 2021-01-22 21:13. Linux-Release: openSUSE Tumbleweed 20210430 Linux 5.12.0-1-default x86_64. 2021-05-03 05:13:01 IRV-20210501-V02-rvh:~ # Please send the reply to Support@IRV.at.
Mit freundlichen Grüßen / with best regards
Ing. Ronald VOLF http://www.irv.at/ IRV Datenverarbeitung GmbH Internet: www.irv.at (http://www.irv.at/) Mail: Sales@IRV.at Tel.: (+43-2236) 2236 7 * Fax: (+43-2236) 2191 7 / 30 Addr.: Brown Boveri Strasse 6, Top 18 2351 Wr. Neudorf, Austria
Hi!
Not sure which os you are using but perhaps if it's redhat based, you need to ensure correct selinux context on the directory and files? Or you have some other thing preventing you from writing, so you should probably check dmesg
and /var/log/audit/audit.log
and such.
Aki
Le 5/3/21 à 4:19 AM, Volf, Ronald (IRV) a écrit :
Our Dir-Structure is: (for testing, we changed all to mod 777) 2021-05-03 04:29:32 IRV-20210501-V02-rvh:~ # dir -d /var/ /var/log/ /var/log/IRV_MdM/ /var/log/IRV_MdM/Dovecot_main.log drwxrwxrwx 11 root root 4096 2021-04-30 20:36:51 /var/ drwxrwxrwx 21 root root 4096 2021-05-03 02:53:34 /var/log/ drwxrwxrwx 4 IRV_MdM IRV_MdMG 4096 2021-05-03 04:28:09 /var/log/IRV_MdM/ -rwxrwxrwx 1 IRV_MdM IRV_MdMG 14 2021-05-03 01:36:18 /var/log/IRV_MdM/Dovecot_main.log 2021-05-03 04:29:48 IRV-20210501-V02-rvh:~ # Hello,
You can replace that with namei. For example :
ychaouche#ychaouche-PC 11:39:17 ~ $ namei -l /var/log/dmesg f: /var/log/dmesg drwxr-xr-x root root / drwxr-xr-x root root var drwxrwxr-x root syslog log -rw-r----- root adm dmesg ychaouche#ychaouche-PC 11:39:30 ~ $
-- Yassine.
participants (3)
-
Aki Tuomi
-
Volf, Ronald (IRV)
-
Yassine Chaouche