Error on adding a New Device Group

The output of ./validate.php


Component Version
LibreNMS 1.55
DB Schema 2019_07_09_150217_update_users_widgets_settings (140)
PHP 7.2.19-0ubuntu0.18.04.2
MySQL 10.1.41-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0

[OK] Composer Version: 1.9.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

The output of ./
[email protected]:~$ ./
Updating to latest release OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

When I click on Devices->Manage Groups->New Device Group, the following error appears

Excerpt from the librenms.log

[2019-09-03 15:50:42] production.ERROR: file_put_contents(/opt/librenms/cache/devices_relationships.cache): failed to open stream: Permission denied {“userId”:1,“exception”:"[object] (ErrorException(code: 0): file_put_contents(/opt/librenms/cache/devices_relationships.cache): failed to open stream: Permission denied at /opt/librenms/LibreNMS/DB/Schema.php:173)
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘file_put_conten…’, ‘/opt/librenms/L…’, 173, Array)
#1 /opt/librenms/LibreNMS/DB/Schema.php(173): file_put_contents(‘/opt/librenms/c…’, ‘a:2:{s:7:"versi…’)
#2 /opt/librenms/LibreNMS/Alerting/QueryBuilderFilter.php(92): LibreNMS\DB\Schema->getAllRelationshipPaths()
#3 /opt/librenms/LibreNMS/Alerting/QueryBuilderFilter.php(57): LibreNMS\Alerting\QueryBuilderFilter->generateTableFilter()

The file /opt/librenms/cache/devices_relationships.cache does not exist.

A run of the “Validate Config” option in the WebUI does not show any permission problems.

This is a new install, only 3 days old and I’m a newbie with librenms.

I had to manually add a cronjob to fix the permissions under /opt/librenms with setfacl because rrd files for newly added devices wouldn’t be created with proper permissions. There are multiple threads here regarding this specific problem but I don’t think it is connected to my actual New-Device-Group-problem.

Any help greatly appreciated

Welcome! Try run through all the troubleshooting steps in this thread

#Two Issues after fresh install

librenms user was already a member of www-data group.

chmod g+w /opt/librenms/cache fixed the problem.

Thx a lot