On Sun, Jul 10, 2022 at 01:35:50AM +0200, Holger Levsen wrote:
> after the bullseye 11.4 point release I started to see the following mails
> from logcheck:
>
> Jul 10 00:00:24 mainframe logrotate[37314]: error: state file /var/lib/logrotate/status is world-readable and thus can be locked from other unprivileged users. Skipping lock acquisition...
Does this only happen for the first logrotate invocation after the
update or continuously?
If continuously what are the permissions of the state file (`ls -l
/var/lib/logrotate/status`)?
On Sun, 10 Jul 2022 at 09:45, Salvatore Bonaccorso <
car...@debian.org> wrote:
>
> I wonder if the packaging should adjust the permissions as well on the
> state file on update? (which technically not part of the fix, if the
> state file is not present it is created correctly with 0640
> permissions, but a present one should be adjusted?).
Something like the following in postinst:
if [ -f /var/lib/logrotate/status ]; then
mv /var/lib/logrotate/status /var/lib/logrotate/status.old
install -m 0640 /var/lib/logrotate/status.old /var/lib/logrotate/status
fi
?