I have the following in my news.daily report: /usr/lib/news/bin/scanlogs: line 135: /var/log/news/news.crit: Permission denied /usr/lib/news/bin/scanlogs: line 135: /var/log/news/news.err: Permission denied /usr/lib/news/bin/scanlogs: line 135: /var/log/news/news.notice: Permission denied The reason is that these files are owned by syslog.adm:
Since when? inn has always cooperated with the standard syslogd. Yes, everybody knows this. So it is not going to change soon...
Hi Marco and Richard, argument for news.daily (in sample inn2 crontab) and provide a logrotate entry for standard Debian logrotate program? It would do the trick, wouldn't it? or am I missing something? Basically, scanlogs performs two kinds of actions: a few files are copied for backup purpose (like the active file) and a few files are rotated. P.-S.: If something needs being changed in scanlogs (reorganization of code or new arguments to use) so that using logrotate in Debian is eased, do not hesitate to tell. INN 2.5.3 will be released this month.
It's the behavior of the sysklogd package in sid. I assume it was introduced in 1.5-6.1 but I don't know for sure. ttfn/rjk
I do not think so, since the two actions need to be coordinated. I see a suid wrapper as a more plausible solution (and it is not much of one...).
md@Linux.IT (Marco d'Itri) writes: Could news.daily do its analysis on the .0 version of the logs after being rotated by logrotate? Some coordination is still needed, but not a lot.
Hi Russ, I have not thoroughly looked at the code but I do not see why news.daily/scanlogs could not use .0 versions. Yet, are we sure that logrotate will always generate these files? (If a user changes the configuration of logrotate, it could break log analysis.) Would a new "rotate=<program>" option to news.daily be usable for Debian? We could then skip the rotation part of news.daily/scanlogs and run instead <program>. rotate="logrotate inn2" may be used for Debian, with a proper /etc/logrotate.d/inn2 configuration file. Does it sound good? I can have a look at it, if it is usable by Debian (and probably other distributions, that have a similar logrotate program).
Julien ÉLIE <julien@trigofacile.com> writes: Yeah, but... I think at some level we have to make some documented assumptions about log rotation and go with that. As long as there's a comment somewhere in the inn2 configuration file telling people what to do if they want to change it, I think this is okay. But we'd need to convince logrotate to not also run the inn2 configuration when it runs normally from cron.daily.
The problem is that somebody may change the logrotate configuration (e.g. moving it after news.daily is run) without knowing about INN. It already ignores the news.* files.
Hi Marco,
Could news.daily be run by a "postrotate" section in logrotate?
We could imagine to run news.daily with the "norotate" keyword in this case.
If I run "man logrotate" on Lenny (I have not checked on Squeeze), I read:
/var/log/news/news.crit {
monthly
rotate 2
olddir /var/log/news/old
missingok
postrotate
kill -HUP ‘cat /var/run/inn.pid‘
endscript
nocompress
}
I wonder why this example is given in the documentation. It will give
unwise ideas for dealing with inn2 log files at the moment.
Hopefully no default inn2 configuration is shipped by default.
rsyslog does not do this (yet). So for people who can accept changing to a different syslogd, a workaround is to use that instead of sysklogd. This part of the bug remains even with rsyslog. One possible option would be a userv service to allow the news user to send a SIGHUP to [r]syslogd. ttfn/rjk