Ad Widget

Collapse

fping failed after change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PopeGregoryIX
    Junior Member
    • Sep 2016
    • 3

    #1

    fping failed after change

    Hi All,

    I have meddled with my Zabbix server and, alas, have not made it better. I was attempting to setup a simple test of net.tcp.service[http,,80] which was failing. Reading around the issue, I ran these two commands

    Code:
    sudo chmod 4710 /usr/bin/fping
    sudo chown root:zabbix /usr/bin/fping
    This made my test work. But it has now prevented all of my icmppingloss, icmpping and icmppingsec tests from working. The status is now Not Supported and the Error is:

    Code:
    'fping failed: "(null): can't create socket (must run as root?):Permission denied'
    I am not an expert in Ubuntu (far from it). I should not have started messing about with things I don't fully understand! But I did, and now I'm stuck. Can anyone help?

    Thanks
    Pope.
  • peatb
    Zabbix Certified Trainer
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2016
    • 36

    #2
    On centos, fping looks like this:
    Code:
    -rwsr-sr-x 1 root root 27856 apr 17  2012 /usr/sbin/fping
    so try:
    Code:
    sudo chmod 6755 /usr/bin/fping
    This might fix it. But the commands you used are what's in the documentation of zabbix, but that also specifies to check the fping documentation. So if this doesn't work, check how it should be on ubuntu.
    Last edited by peatb; 29-09-2016, 10:46.

    Comment

    • PopeGregoryIX
      Junior Member
      • Sep 2016
      • 3

      #3
      Almost fixed... I think

      Thanks PeatB. I followed your instructions and also read here:



      In the end, the commands I ran were:

      Code:
      sudo chown root:zabbix /usr/bin/fping
      sudo chmod 6755 /usr/bin/fping
      sudo chmod +s /usr/bin/fping
      sudo service apache2 restart
      The checks are now showing as supported and under Latest Data there are some results coming in. The graphs of latest data show huge gaps and the new data isn't in there yet, but I'm guessing that's just a matter of waiting until enough data comes in.

      I can't pretend that I fully understand what it is you have done to help me but I am eternally grateful.

      Best wishes,
      Pope

      Comment

      • guzzijason
        Senior Member
        • Dec 2015
        • 106

        #4
        'chmod 6755' and 'chmod +s' effectively do the same thing, so those commands are sort of redundant. Both enable the SUID ("Set User ID") on the executable, which means "execute this binary with the UID of the file owner, not the user running it". In your case, it causes fping to run as the "root" user, and not the "zabbix" user.

        I would suggest reading up on this, and file file permissions in general, as full understanding of all these permissions bits is VERY important for a linux administrator. Improper use of SUID bits can be EXTREMELY dangerous if you don't know what you're doing with them, and can cause very serious security problems. Don't take executable file permissions lightly, please.

        __Jason

        Comment

        • PopeGregoryIX
          Junior Member
          • Sep 2016
          • 3

          #5
          Originally posted by guzzijason
          'chmod 6755' and 'chmod +s' effectively do the same thing, so those commands are sort of redundant. Both enable the SUID ("Set User ID") on the executable, which means "execute this binary with the UID of the file owner, not the user running it". In your case, it causes fping to run as the "root" user, and not the "zabbix" user.

          I would suggest reading up on this, and file file permissions in general, as full understanding of all these permissions bits is VERY important for a linux administrator. Improper use of SUID bits can be EXTREMELY dangerous if you don't know what you're doing with them, and can cause very serious security problems. Don't take executable file permissions lightly, please.

          __Jason
          Thanks Jason. Sounds like good advice.

          Comment

          Working...