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).

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.

I'm not sure what the right answer is overall. inn2 and syslogd need to cooperate somehow to rotate the logs at the right point in a way that doesn't lose any log messages.

ii  inn2               2.5.2+20110413-1+b 'InterNetNews' news server
ii  sysklogd           1.5-6.1            System Logging Daemon

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