Ad Widget

Collapse

Log file monitoring, Permissions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kazuki
    Junior Member
    • Oct 2012
    • 6

    #1

    Log file monitoring, Permissions

    Hi,
    I try monitoring logs but this error appear in the agent log

    Code:
    1508:20121030:130358.748 zabbix_agentd active check started [192.168.61.177:10051]
      1507:20121030:130358.751 zabbix_agentd listener started
      1508:20121030:130558.865 Cannot open [/var/log/apache2/logpersonal.log] [Permission denied]
      1508:20121030:130558.866 Active check [log["/var/log/apache2/logpersonal.log"]] is not supported. Disabled.
    I give all permissons to the "logpersonal.log" (chmod 777) but the error still.
    I solved it changing the owner of the file to "zabbix" and work! but its“n a good way it have to be "root"(or whatever but not zabbix)

    any ideas?
  • ufocek
    Senior Member
    • Aug 2006
    • 161

    #2
    You should configure sudo for that.

    Comment

    • jerrylenk
      Member
      Zabbix Certified Specialist
      • May 2010
      • 62

      #3
      If the agent can't read the file even with 777 permissions, maybe it's a missing permission on the directory? To find a file inside a directory, one needs a 5 permission, read and execute.

      However, that would only explain how it did work, if you chowned the directory, too.


      I would not allow user zabbix to sudo all without entering a password, because that is exactly the point about "don't run agent as root!"

      Comment

      • kazuki
        Junior Member
        • Oct 2012
        • 6

        #4
        thaks.
        I forgot give permission to the directory

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #5
          please dont use chmod 777 =epic fail

          add zabbix to the adm group! adm can read the logfiles, normaly
          Debian-User

          Sorry for my bad english

          Comment

          Working...