I am getting daily errors for the logrotate
these are not serious errors, but I still want to get rid of them
here is the error I get in /var/log/messages
logrotate: error: stat of /var/log/news/news.crit failed: Permission denied
logrotate: error: stat of /var/log/news/news.err failed: Permission denied
logrotate: error: stat of /var/log/news/news.notice failed: Permission denied
here is my /etc/logrotate.conf
[CODE]cat /etc/logrotate.conf
see “man logrotate” for details
rotate log files weekly
weekly
keep 4 weeks worth of backlogs
rotate 4
create new (empty) log files after rotating old ones
create
use date as a suffix of the rotated file
dateext
uncomment this if you want your log files compressed
#compress
comment these to switch compression to use gzip or another
compression scheme
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2
former versions had to have the compressext set accordingly
#compressext .bz2
RPM packages drop log rotation information into this directory
include /etc/logrotate.d
no packages own wtmp and btmp – we’ll rotate them here
#/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
#}
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
#}
system-specific logs may be also be configured here.
[/CODE]
debugging:
logrotate -v /etc/logrotate.conf
rotating pattern: /var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
[B]switching euid to 9 and egid to 13[/B]
considering log /var/log/news/news.crit
error: stat of /var/log/news/news.crit failed: Permission denied
considering log /var/log/news/news.err
error: stat of /var/log/news/news.err failed: Permission denied
considering log /var/log/news/news.notice
error: stat of /var/log/news/news.notice failed: Permission denied
switching euid to 0 and egid to 0
permissions of the files
-rw------- 1 news news 0 2012-05-14 14:29 news.crit
-rw------- 1 news news 0 2012-05-14 14:29 news.err
-rw------- 1 news news 0 2012-05-14 14:29 news.notice
I noticed this in the debug:
switching euid to 9 and egid to 13
there is no configuration set to change the permissions, why is it doing this ?
euid means effective UID, but I am not sure what 9 means
this looks the root cause, but how to deal with it?