After distribution upgrade from Squeeze to Wheezy logcheck sends the following e-mails: "Subject: Cron <logcheck@gaugino> if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi Date: Fri, 18 Jul 2014 11:02:02 +0000 (UTC) sort: open failed: /tmp/logcheck.hD3dDo/logoutput/*: No such file or directory"
This is a problem that can present itself and generate cron emails not only if the permissions are wrong, but also if the file /etc/logcheck/logcheck.logfiles does not contains any non commented line To avoid receiving notification I have modified the following line: - $SORT "$TMPDIR/logoutput"/* | sed -e 's/[[:space:]]\+$//' | cat \ + cd && find "$TMPDIR/logoutput" -type f | $SORT | sed -e 's/[[:space:]]\+$//' | cat \ Matteo Castellani
This is caused by something making /var/log/syslog root:root 600 on dist-upgrade on my system.
Most of this bug no longer applies, but there is a small issue The current code (line 783 approx) catches errors from $SORT, but if the error comes from having zero log files to check i think it will be a bit confusing. currently logoutput-sorted would be created as an empty file, but the call to error() would be a bit confusing And (once we add a systemd unit) the stderr from sort/sed could end up in the journal Think before the call to $SORT logcheck should check if $TMPDIR/logoutput/ is empty and if so, silently (or perhaps with error as it seems unlikely to be deliberate) do an exit 0 I think perhaps worth redirecting stderr into "$TMPDIR/logoutput-sorted" (perhaps needed elsewhere too) but i did not consider this fully yet one for post-bookworm