Ad Widget

Collapse

Permissions error scanning a linux log

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mellis
    Senior Member
    • Oct 2017
    • 145

    #1

    Permissions error scanning a linux log

    I am using a 4.4.10 server and a 4.4.4 agent, Oracle Linux 7.8

    I am looking at scanning and finding errors in a log file on a linux system.I an using the Agent(active) log key log[/opt/bis/log/wfs.log,DEBUG,,50.skip,,] I have made the directory 774 and the log file 666. I am getting an [13] permissions denied error in the agent log file.

    Anyone have an idea what i need to do?

    Thanks


  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    You almost never want to have "4" as one of the modes on a directory, unless you're doing something truly odd.

    You don't say what group the directories or file are, and that matters in this case, because it helps confirm whether the permissions that matter for the zabbix agent are the "group" permissions (the middle octal number) or the "other" permissions (the right-most octal number).

    I'll assume the most likely case, that the user that the zabbix agent runs as (probably zabbix, and it probably only belongs to one group, probably also named 'zabbix') is not a member of the group that the /opt/bis, /opt/bis/log, and /opt/bis/log/wfs.log have as their group owner. In that case, the permissions that matter are the right-most octal number.

    With that in mind, make sure that the right-most permission on /opt/bis and /opt/bis/log is the number 5. For directories that means "search and access", which is the permission to both read the contents of the directory and the permission to *access* the contents of the directories.

    Then, make the right-most permission on the wfs.log be "4" (read). Zabbix does not need "read+write" for the log file, so "6" is more than is necessary.

    Finally, you can have all the permissions set correctly, but if SELinux is active and the appropriate tags are not set, SELinux can and will override the filesystem permissions and block access. In that case, you also need to use the SE-related tools to grant the agent access to that file.

    Comment

    • mellis
      Senior Member
      • Oct 2017
      • 145

      #3
      Thank You, the permission of 5 on the directories fix the issue.

      Comment

      Working...