Permission errors when deleting host

Hi!

LibreNMS works great here. The only thing is: In /opt/librenms/rrd/ the host directories get created without write permissions for the group (drwxr-xr-x), so there are permission errors, when I delete a host.

Can’t delete: /opt/librenms/rrd/192.168.1.1: permission denied

Where can I set correct permissions at creation time?

TIA

chmod -R g+w /opt/librenms/rrds

Permissions of new files are based on the parent directory.

That was my first guess, too. I just did the chmod again, like you suggested. But it is still the same: drwxr-xr-x.

I’ve noticed that I’m having the same issue with my permissions. The g+w doesn’t seem to work.
I did validate that the librenms group has access on an ls -lga (CentOS 7). I have to go in and manually delete the rrd files out afterwards…

Thoughts?

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

Component Version
LibreNMS 1.31.03-45-gb4d804f
DB Schema 206
PHP 7.0.22
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

I believe I found and fixed the issue. As it turned out, CentOS 7 has SELinux set to Enforcing by default. Once I set it to disabled and rebooted, it’s working fine now.

I think this is something that one of the developers may want to address or put it in the documentation that SELinux needs to be disabled.

Thanks!

P

this is documented https://docs.librenms.org/Installation/Installation-CentOS-7-Apache/#selinux

OH SNAP!

I must have missed that during my initial setup. My apologies…

Disabling SELinux is never a good idea. Better stick to the documented way of allowing the necessary contexts and keep it on Enforcing.

I just put things back to enforcing and ran the commands i had missed during my initial setup. Thanks for pointing this out.

1 Like