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.log0 0 * * * root /usr/bin/nice -n20 /usr/pbi/squidguard-squid3-amd64/etc/rc.d/squidGuard_logrotatecat /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.logMy work around
cd /var/log rm /var/log/squidGuard.log ln -s /var/squidGuard/log/squidGuard.log squidGuard.logEverything ok and no more logs from squidGuard at squid cache.log
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy