Poller causing file permission errors

Since late last week, any time the poller runs I am getting the following when I run ./validate.php.

====================================

Component Version
LibreNMS 1.43-119-g6242f94
DB Schema 268
PHP 7.0.32-0ubuntu0.16.04.1
MySQL 10.0.36-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.7.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Some folders have incorrect file permissions, this may cause issues.
[FIX] sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

    Files:
     /opt/librenms/rrd/10.233.5.26/port-id58227.rrd

I run the fix, but the error comes back within 5 minutes. This is causing ./daily.sh to fail as well.

What user does the file belong too ?

When I run ls -l it shows librenms as the user and group?

-rw-r–r-- 1 librenms librenms

I have the same problem, is there no one that know how to resolve this?

@David_Waldrop, did you ever solve this?

/Patricio

No, it has slowed down, but not gone away completely. I am getting the errors at least 2 - 3 times a day instead of every time the poller runs like before.

Ok, bad thing, my setup also suffers from this.

Don’t remember it having the issue before.

Would highly suggest you go back through the install docs.

@laf
Done that and can’t find what causes this anyway.

This is my setup:

Component Version
LibreNMS 1.45-72-g7c4fac4
DB Schema 272
PHP 7.0.32-0ubuntu0.16.04.1
MySQL 10.0.36-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

And ./validate.php output:
Fail: Some folders have incorrect file permissions, this may cause issues.

Fix: sudo chown -R librenms:librenms /opt/librenms sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

  • Files
  • /opt/librenms/rrd/ip-of-my-device/port-id4418.rrd

ls -l on the file:
-rw-r–r-- 1 librenms librenms 1849688 Dec 1 20:38 /opt/librenms/rrd/ip-of-my-device/port-id4418.rrd

ls -l on the file after the fixes:
-rw-rw-r-- 1 librenms librenms 1849688 Dec 1 20:38 /opt/librenms/rrd/ip-of-my-device/port-id4418.rrd

If i run the fix commands it solves the problem, but as soon as a new rrd graph is created the file is created with same wrong permissions.

/P

You’ve got something in your setup causing this which is not standard. Seems like the umask on creating new files so I’d check any .bash* files in the librenms home dir.

@laf, ok, what should i look for?

/Pato

Anything new on this? I’m having the same problem.

1 Like

This command (from the install docs) should fix the issue and cause files to be created with the right mask. But you need ACLs enabled on your OS for it to work.

setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
1 Like