Errors on ./validate.php for fping

I’ve found a workaround, but not really a solution.

The issues I think is with Linux Containers, I have the issue using ext4 and btrfs as the container storage, hosting out of Ubuntu 17.04 on Hyper-V, VirtualBox, and directly on metal. Once the machine is in a container, the issue appears.

Anyway, in short; run setcap on the host VM against the file inside the container; roughly as follows:

root@vm-host:~# lxc exec librenms -- /bin/bash

root@librenms:~# getcap /usr/bin/fping
root@librenms:~# setcap CAP_NET_RAW+ep /usr/bin/fping
Failed to set capabilities on file `/usr/bin/fping' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

root@librenms:~# exit

root@vm-host:~# cd /var/lib/lxd/containers/librenms/rootfs/
root@vm-host:/var/lib/lxd/containers/librenms/rootfs# setcap cap_net_raw+ep ./usr/bin/fping	
root@vm-host:/var/lib/lxd/containers/librenms/rootfs# lxc exec librenms -- /bin/bash

root@librenms:~# getcap /usr/bin/fping
/usr/bin/fping = cap_net_raw+ep
1 Like