logrotate doesn't change the permissions of the existing log files
Issue
- Customer complained that the permissions of the existing /var/log/btmp* files didn't change after /etc/logrotate.d/btmp was changed from "create 0660 root utmp" to "create 0600 root utmp" and logrotate command was executed.
# sudo sh -c "ls -lt /var/log/btmp*" | cat -n
1 -rw-rw---- 1 root utmp 12288 Mar 18 09:18 /var/log/btmp
2 -rw-rw---- 1 root utmp 119 Feb 18 19:02 /var/log/btmp-20220301.gz
3 -rw-rw---- 1 root utmp 20 Jan 12 20:39 /var/log/btmp-20220201.gz
Environment
- Red Hat Enterprise Linux
- logrotate
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.