why is web traffic being written to the rotated log file?

Chris W. Parker cparker at swatgear.com
Wed Mar 29 17:22:58 UTC 2006


A.Fadyushin at it-centre.ru <mailto:A.Fadyushin at it-centre.ru>
    on Wednesday, March 29, 2006 5:33 AM said:

> The problem with logrotate and absence of execute permission for /tmp
> may be solved by editind /etc/cron.daily/logrotate script and setting
> therein the variable TMPDIR (via 'export TMPDIR=<somewhere>' before
> calling logrorate) to some directory with execute permission (for
> example /var/run). The logrotate will then use value of TMPDIR instead
> of /tmp.

Sounds good except look what I found in /etc/cron.daily/logrotate:

#!/bin/sh

# TMPDIR value other than /tmp needs to be set because of the noexec
# option on /tmp that is currently set.
export TMPDIR=/var/tmp/logrotate

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with
[$EXITVALUE]"
fi
exit 0


Any other ideas?


Thank you,
Chris.




More information about the redhat-list mailing list