2010-08-13 16:25:10 |
Travis Hampton |
description |
Binary package hint: logrotate
Not completely uninstalling apache2 resulted in logrotate rotating /dev/null and some other files.
cat /var/lib/logrotate/status | grep -v /var/log
logrotate state -- version 2
"fi" 2010-5-25
"/dev/null" 2010-8-12
"/etc/init.d/apache2" 2010-8-12
"}" 2010-5-25
"endscript" 2010-5-25
">" 2010-5-25
"reload" 2010-5-25
ls -al /dev/null*
-rw-r--r-- 1 root root 49 2010-08-13 10:56 /dev/null
crw-rw-rw- 1 root root 1, 3 2010-08-09 15:49 /dev/null.1
dpkg --list | grep apache2
rc apache2.2-common 2.2.14-5ubuntu8 Apache HTTP Server common files
/etc/logrotate.d/apache2:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
} |
Binary package hint: logrotate
This morning I started getting the following error:
sh: cannot create /dev/null: Permission denied
I then ran ls -al /dev/null*
-rw-r--r-- 1 root root 49 2010-08-13 10:56 /dev/null
crw-rw-rw- 1 root root 1, 3 2010-08-09 15:49 /dev/null.1
Looked to me like /dev/null had been rotated. So I looked at logrotate's status file and "/dev/null" and "/etc/init.d/apache2" was in there with yesterday's date. I also noticed there was some other weird entries in the file. I looked in /etc/logrotate.d/ and found the apache2 file. I then discovered I hadn't purged apache's config files when I removed apache2. At this point I assumed the left over config file was the issue as it was the only config file that contained all the items that where being rotated.
cat /var/lib/logrotate/status | grep -v /var/log
logrotate state -- version 2
"fi" 2010-5-25
"/dev/null" 2010-8-12
"/etc/init.d/apache2" 2010-8-12
"}" 2010-5-25
"endscript" 2010-5-25
">" 2010-5-25
"reload" 2010-5-25
dpkg --list | grep apache2
rc apache2.2-common 2.2.14-5ubuntu8 Apache HTTP Server common files
/etc/logrotate.d/apache2:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}
*added additional info |
|