Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    SquidGuard log rotate bug

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 1 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • belleraB
      bellera
      last edited by

      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
      
      1 Reply Last reply
      Reply Quote 0
      • belleraB
        bellera
        last edited by

        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

        1 Reply Last reply
        Reply Quote 0

        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 Login
        • First post
          Last post
        Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
        Privacy Policy · Cookie Policy