Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SquidGuard log rotate bug

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 1 Posters 2.0k 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
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.