On 01/10/2011 09:24, Richard Kettlewell wrote:
Package: inn2
Version: 2.5.2+20110413-1+b1

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:

-rw-r--r-- 1 syslog adm 0 May 15 04:15 /var/log/news/news.crit
-rw-r--r-- 1 syslog adm 1059 Aug 20 13:20 /var/log/news/news.err
-rw-r--r-- 1 syslog adm 6399076 Oct 1 09:10 /var/log/news/news.notice

This is enforced by the syslogd package (every time it starts up).

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.

The way in which inn's scanlogs attempts to rotate the logs is as follows:

## Copy syslog files, truncating old inode since syslog has it open.
for F in ${SYSLOGS}; do
rm -f ${F}.old
cp ${F} ${F}.old
cat /dev/null >${F}
done

This would be broken even if the cat didn't fail due to the file
permissions - if a message is logged after the copy but before the cat
then it will be lost. Better would be to rename the file aside, create a
new one and signal syslogd to make it re-open it - except that all this
runs as news so cannot signal syslogd.

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



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to