Ad Widget

Collapse

Cannot obtain filesystem information: [13] Permission denied

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dunnsland
    Member
    • Dec 2021
    • 81

    #1

    Cannot obtain filesystem information: [13] Permission denied

    Greetings All,

    I have searched around and found a few posts related to this issue but none of them provide any clarity or an answer.

    I have added a server to my zabbix dashboard monitoring some web services.
    One of the services is checking the file system for my familytree installation.

    All suggestions ask to run the zabbix_agentd query directly on the related server as follows. On the commandline everything works as expected, but zabbix dashboard is showing the error in the attachment permissions_error01.png

    below are the results of the test from the commandline.

    zabbix_agentd -t vfs.fs.size[/home/dunnftp/phpgedview,pfree]
    vfs.fs.size[/home/dunnftp/phpgedview,pfree] [d|95.273423]
    zabbix_agentd -t vfs.fs.size[/home/dunnftp/phpgedview,pused]
    vfs.fs.size[/home/dunnftp/phpgedview,pused] [d|4.726578]
    zabbix_agentd -t vfs.fs.size[/home/dunnftp/phpgedview,total]
    vfs.fs.size[/home/dunnftp/phpgedview,total] [u|1966124343296]
    zabbix_agentd -t vfs.fs.size[/home/dunnftp/phpgedview,used]
    vfs.fs.size[/home/dunnftp/phpgedview,used] [u|88206229504]

    Does anyone know why it works on the commandline and not within zabbix.

    Thanks
    Lawrence
    Attached Files
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    zabbix_agentd executes as a service account (generally named 'zabbix', and that account is generally a member of a group named 'zabbix'). This account does not have special, elevated privileges, nor should it. It's a user with limited access by design.

    A normal user on a Linux system (like the 'zabbix' user) has access to many system directories, either because normal users need access to that directory to be able to function or because there is no security gained by restricting access to a particular area.

    However, on a multi-user Linux system, one user doesn't generally have access to the home directory of a different user. The default permissions on /home/dunnftp are likely such that no user other than 'dunnftp' has access. If that's the case, the 'zabbix' user cannot access content within /home/dunnftp, so some of the items you're asking it to collect may be getting 'permission denied'.

    Those checks work when you run them because presumably you're running them as a user (dunnftp?) that has permissions that allow access to that area.

    There are multiple ways you can grant access to that content, but it really helps to have a good understanding of the permission system in general. If you don't, many of the things you may read about on well-intentioned web sites may be opening you up to security dangers or may cause other problems.

    Is /home/dunnftp/phpgedview a separate mountpoint, or is it just a subdirectory within the /home filesystem?

    Comment

    • dunnsland
      Member
      • Dec 2021
      • 81

      #3
      tim.mooney
      Strange thing is last night while laying in bed, I realised that I had not provided all of the necessary information.
      To clarify. There is a directory under /home/dunnftp/phpgedview. I have then created a bond mount point from the web location to the local directory.
      After thinking about it, I don't think that it is necessary to actually monitor that location, but in the same, how would the zabbix user monitor web resources? These are normally managed by the root user or www-data.
      so what you clarified makes sense.

      Thanks
      Lawrence
      Last edited by dunnsland; 31-10-2022, 09:36.

      Comment

      Working...