Re: [CentOS] read permission on rotated logs

2019-03-14 Thread Pete Biggs
On Thu, 2019-03-14 at 15:45 +, Leroy Tennison wrote: > Maybe I'm missing something here but doesn't logrotate have the > 'postrotate ... endscript' block for its configuration files where > you can run any command you desire? The problem is knowing the name that the logfile has just been rotat

Re: [CentOS] read permission on rotated logs

2019-03-14 Thread Pete Biggs
On Thu, 2019-03-14 at 11:51 +0100, Mogens Kjaer wrote: > On 3/13/19 11:13 PM, Alice Wonder wrote: > > When logs (e.g. /var/log/maillog) are rotated (e.g. to > > /var/log/maillog-MDD) is there a way via systemd or whatever to > > assign read permission to a specific group? > > Add the followi

Re: [CentOS] read permission on rotated logs

2019-03-14 Thread Mogens Kjaer
On 3/13/19 11:13 PM, Alice Wonder wrote: When logs (e.g. /var/log/maillog) are rotated (e.g. to /var/log/maillog-MDD) is there a way via systemd or whatever to assign read permission to a specific group? Add the following line to /etc/logrotate.d/syslog, e.g. after sharedscripts: create 6

Re: [CentOS] read permission on rotated logs

2019-03-13 Thread Pete Biggs
On Wed, 2019-03-13 at 15:13 -0700, Alice Wonder wrote: > When logs (e.g. /var/log/maillog) are rotated (e.g. to > /var/log/maillog-MDD) is there a way via systemd or whatever It's logrotate that does it. You may want to look at the 'prerotate' and 'postrotate' sections of the logrotate confi