[CentOS] read permission on rotated logs

Thu Mar 14 11:13:53 UTC 2019
Pete Biggs <pete at biggs.org.uk>

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-YYYYMDD) 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 640 root somegroup
> 

I thought the create command created the new log with those permissions
not changed the owner/permission of the rotated logs.  Alice said she
would like:

   -rw------- 1 root root 3105240 Mar 13 22:04 maillog
   -rw-r----- 1 root somegroup 1079031 Feb 24 04:39 maillog-20190224
   -rw-r----- 1 root somegroup 7237640 Mar  1 12:59 maillog-20190228
   -rw-r----- 1 root somegroup 1297508 Mar  3 04:21 maillog-20190303
   -rw-r----- 1 root somegroup 1319371 Mar 10 08:17 maillog-20190310

P.