From e4e41a3e5dc4a2e0ee95f5f60dcfbcd51372896e Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Wed, 17 Jul 2019 10:27:13 +0200 Subject: [PATCH] Fix logrotate configuration. logrotate refused to rotate the logfile due to permissions: ``` logrotate[6248]: error: skipping "/var/log/cgrates/CGRateS.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation ``` Ownership of the directory and logfile is root/adm: ``` total 192 drwxrwxr-x 2 root adm 4096 Jul 17 10:24 . drwxr-xr-x 8 root root 4096 Jul 17 00:00 .. -rw-r----- 1 root adm 182485 Jul 16 15:52 CGRateS.log ``` --- data/conf/logging/deb_logrotate.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/data/conf/logging/deb_logrotate.conf b/data/conf/logging/deb_logrotate.conf index dc4f36caf..10f15331f 100644 --- a/data/conf/logging/deb_logrotate.conf +++ b/data/conf/logging/deb_logrotate.conf @@ -6,6 +6,7 @@ compress delaycompress sharedscripts + su root adm postrotate /usr/lib/rsyslog/rsyslog-rotate endscript