Error: bootstrap/cache, storage, Run these commands as root on your LibreNMS server to fix: chown -R librenms:librenms /opt/librenms/bootstrap/cache

Hello,

I had issue and I need help. Details below:

result of: validate.php
Component Version
LibreNMS 1.39-39-g2815979f5
DB Schema 249
PHP 7.0.30
MySQL 5.1.73
RRDTool 1.3.8
SNMP NET-SNMP 5.5

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[[email protected] /root]$/daily.sh
bash: /daily.sh: No such file or directory
[[email protected] /root]$./daily.sh
bash: ./daily.sh: Permission denied
[[email protected] /root]$whoami
librenms
[[email protected] /root]$/opt/librenms/daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[[email protected] /root]$

and on the web page I have:

Error: bootstrap/cache, storage, storage/framework/sessions, storage/framework/views, storage/framework/cache, logs not writable! Run these commands as root on your LibreNMS server to fix:
chown -R librenms:librenms /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs storage/framework/cache, logs not writable! Run these commands as root on your LibreNMS server to fix:
chown -R librenms:librenms /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs

setfacl -R -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs

setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache /opt/librenms/logs

If using SELinux you may also need:
semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/bootstrap/cache(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/bootstrap/cache(/.*)?’

restorecon -RFvv /opt/librenms/bootstrap/cache

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage(/.*)?’

restorecon -RFvv /opt/librenms/storage

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage/framework/sessions(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage/framework/sessions(/.*)?’

restorecon -RFvv /opt/librenms/storage/framework/sessions

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage/framework/views(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage/framework/views(/.*)?’

restorecon -RFvv /opt/librenms/storage/framework/views

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage/framework/cache(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage/framework/cache(/.*)?’

restorecon -RFvv /opt/librenms/storage/framework/cache

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/logs(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/logs(/.*)?’

restorecon -RFvv /opt/librenms/logs

I put those propsed commands and nothing changes

Nobody can help?

Did you try a reboot?

can you post the output of:

ls -li /opt/librenms/logs

Check Recommended permissions fixes are ignored [Solved]

It is working now after this actions:

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