logrotate errors - setting user/group
Posted: Mon Aug 16, 2021 1:20 am
Fresh offline install of 5.8.5.1 on RHEL8.
Root's mail has logrotate failures:
/etc/cron.daily/logrotate: error: error setting owner of /usr/local/nagiosxi/var/cleaner.log-20210816 to uid 5557 and gid 100: Operation not permitted error: error setting owner of /usr/local/nagiosxi/var/dbmaint.log-20210816 to uid 5557 and gid 100: Operation not permitted error: error setting owner of /usr/local/nagiosxi/var/sysstat.log-20210816 to uid 5557 and gid 100: Operation not permitted
nagios is
uid=5557(nagios) gid=100(users) groups=100(users),5559(nagcmd),5560(nagios)
looks like rotating is failing anyway:
[root@mondevappla001 logrotate.d]# ls -l /usr/local/nagiosxi/var/clean*
-rw-r--r-- 1 nagios users 6995086 Aug 16 16:14 /usr/local/nagiosxi/var/cleaner.log
-rw------- 1 nagios nagios 0 Aug 14 03:12 /usr/local/nagiosxi/var/cleaner.log-20210814
-rw------- 1 nagios nagios 0 Aug 15 03:25 /usr/local/nagiosxi/var/cleaner.log-20210815
-rw------- 1 nagios nagios 0 Aug 16 03:27 /usr/local/nagiosxi/var/cleaner.log-20210816
Not sure why it is using gid 100 the logrotate stanza says
/usr/local/nagiosxi/var/*log {
missingok
notifempty
size 5M
copytruncate
su nagios nagios
rotate 1
compress
Zebee
Root's mail has logrotate failures:
/etc/cron.daily/logrotate: error: error setting owner of /usr/local/nagiosxi/var/cleaner.log-20210816 to uid 5557 and gid 100: Operation not permitted error: error setting owner of /usr/local/nagiosxi/var/dbmaint.log-20210816 to uid 5557 and gid 100: Operation not permitted error: error setting owner of /usr/local/nagiosxi/var/sysstat.log-20210816 to uid 5557 and gid 100: Operation not permitted
nagios is
uid=5557(nagios) gid=100(users) groups=100(users),5559(nagcmd),5560(nagios)
looks like rotating is failing anyway:
[root@mondevappla001 logrotate.d]# ls -l /usr/local/nagiosxi/var/clean*
-rw-r--r-- 1 nagios users 6995086 Aug 16 16:14 /usr/local/nagiosxi/var/cleaner.log
-rw------- 1 nagios nagios 0 Aug 14 03:12 /usr/local/nagiosxi/var/cleaner.log-20210814
-rw------- 1 nagios nagios 0 Aug 15 03:25 /usr/local/nagiosxi/var/cleaner.log-20210815
-rw------- 1 nagios nagios 0 Aug 16 03:27 /usr/local/nagiosxi/var/cleaner.log-20210816
Not sure why it is using gid 100 the logrotate stanza says
/usr/local/nagiosxi/var/*log {
missingok
notifempty
size 5M
copytruncate
su nagios nagios
rotate 1
compress
Zebee