SquidGuard log rotate bug
-
Tested with squidGuard-squid3 1.4_4 pkg v.1.9.5
/var/log/squidGuard.log is not rotated (file owned by root and written by the WebGUI)
$ find / -name squidGuard.log /var/log/squidGuard.log /var/squidGuard/log/squidGuard.log
0 0 * * * root /usr/bin/nice -n20 /usr/pbi/squidguard-squid3-amd64/etc/rc.d/squidGuard_logrotate
cat /usr/pbi/squidguard-squid3-amd64/etc/rc.d/squidGuard_logrotate #!/bin/sh # # This file generated automaticly with SquidGuard configurator # Rotates the block logfile tail -1000 /var/squidGuard/log/block.log > /var/squidGuard/log/block.log.0 tail -1000 /var/squidGuard/log/block.log.0 > /var/squidGuard/log/block.log rm -f /var/squidGuard/log/block.log.0 # Rotates the squidguard GUI logile tail -1000 /var/squidGuard/log/squidGuard.log > /var/squidGuard/log/squidGuard.log.0 tail -1000 /var/squidGuard/log/squidGuard.log.0 > /var/squidGuard/log/squidGuard.log rm -f /var/squidGuard/log/squidGuard.log.0 # Rotates the squidguard conf logile tail -1000 /var/squidGuard/log//sg_configurator.log > /var/squidGuard/log//sg_configurator.log.0 tail -1000 /var/squidGuard/log//sg_configurator.log.0 > /var/squidGuard/log//sg_configurator.log rm -f /var/squidGuard/log//sg_configurator.log.0
-
I forgot to say that squid is trying also to write to /var/log/squidGuard.log
cat /var/squid/logs/cache.log | grep /var/log/squidGuard.log 2014-04-05 11:19:04 [23381] (squidGuard): can't write to logfile /var/log/squidGuard.log
My work around
cd /var/log rm /var/log/squidGuard.log ln -s /var/squidGuard/log/squidGuard.log squidGuard.log
Everything ok and no more logs from squidGuard at squid cache.log