Whoops, the web server could not write required files to the filesystem :(

Can anyone shed some light on the below ?

which is odd because I’m seeing read/write/execute privileges

how do I proceed ?

Hello,

What is your Linux distribution?
Can you provide the result of:

getfacl /opt/librenms/logs/librenms.log
ls -lahZ /opt/librenms/logs/librenms.log
1 Like

Thanks for the reply, see below.

librenms@librenms:~$ ./validate.php

Component Version
LibreNMS 23.1.0 (2023-01-24T16:43:30+00:00)
DB Schema 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP 8.2.1
Python 3.10.6
Database MariaDB 10.6.11-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.5.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK]
[OK] Dispatcher Service is enabled
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
librenms@librenms:~$ sudo vi config.php
[sudo] password for librenms:
librenms@librenms:~$ cd opt/librenms/logs
bash: cd: opt/librenms/logs: No such file or directory
librenms@librenms:~$ cd /opt/librenms/logs
librenms@librenms:~/logs$ ls
daily.log daily.log.4.gz discovery_wrapper.log.1 discovery_wrapper.log.5.gz librenms.log.2.gz librenms.log.6.gz poller_wrapper.log.2.gz poller_wrapper.log.5.gz
daily.log.1 daily.log.5.gz discovery_wrapper.log.2.gz discovery_wrapper.log.6.gz librenms.log.3.gz poller_wrapper.log poller_wrapper.log.3 poller_wrapper.log.6.gz
daily.log.2.gz daily.log.6.gz discovery_wrapper.log.3.gz librenms.log librenms.log.4.gz poller_wrapper.log.1 poller_wrapper.log.3.gz
daily.log.3.gz discovery_wrapper.log discovery_wrapper.log.4.gz librenms.log.1 librenms.log.5.gz poller_wrapper.log.2 poller_wrapper.log.4.gz
librenms@librenms:~/logs$ vi librenms.log
librenms@librenms:~/logs$ vi librenms.log
librenms@librenms:~/logs$ getfacl /opt/librenms/logs/librenms.log
getfacl: Removing leading β€˜/’ from absolute path names

file: opt/librenms/logs/librenms.log

owner: librenms

group: librenms

user::rwx
group::rwx
other::–x

librenms@librenms:~/logs$ ls -lahZ /opt/librenms/logs/librenms.log
-rwxrwx–x 1 librenms librenms ? 23M Jan 25 21:36 /opt/librenms/logs/librenms.log
librenms@librenms:~/logs$

Is php running as librenms?
You can check the configuration with:

grep "user =" /etc/php-fpm.d/*.conf

You can send the result here enclosed with triple quotes so it is code formatted, eg:
```
:~# grep "user =" /etc/php-fpm.d/*.conf
/etc/php-fpm.d/librenms.conf:user = librenms
```

Hey , Thanks ! i was able to find the issue… there were multiple instances / versions of PHP running

Version 8.1 failing while 8.2 and 7.4 active
β€œβ€"
librenms@librenms:~$ systemctl status php8.1-fpm.service
Γ— php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php8.1-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-01-26 00:03:58 UTC; 17min ago
Docs: man:php-fpm8.1(8)
Process: 2889812 ExecStart=/usr/sbin/php-fpm8.1 --nodaemonize --fpm-config /etc/php/8.1/fpm/php-fpm.conf (code=exited, status=78)
Process: 2889813 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/8.1/fpm/pool.d/www.conf 81 >
Main PID: 2889812 (code=exited, status=78)
CPU: 38ms
librenms@librenms:~$ systemctl status php7.4-fpm.service
● php7.4-fpm.service
Loaded: masked (Reason: Unit php7.4-fpm.service is masked.)
Active: active (exited) since Thu 2023-01-19 14:36:15 UTC; 6 days ago
CPU: 2ms
librenms@librenms:~$ systemctl status php8.2-fpm.service
● php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php8.2-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-01-26 01:06:46 UTC; 44min left
Docs: man:php-fpm8.2(8)
Main PID: 3651005 (php-fpm8.2)
Status: β€œProcesses active: 0, idle: 2, Requests: 66, slow: 0, Traffic: 0req/sec”
Tasks: 3 (limit: 19068)
Memory: 44.8M
CPU: 3.821s
CGroup: /system.slice/php8.2-fpm.service
β”œβ”€3651005 β€œphp-fpm: master process (/etc/php/8.2/fpm/php-fpm.conf)” β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€>
β”œβ”€3651006 β€œphp-fpm: pool www” β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ ">
└─3651007 β€œphp-fpm: pool www” β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ β€œβ€ ">
…skipping…

β€œβ€"

after stopping the services

librenms@librenms:~$ sudo systemctl stop php8.2-fpm.service
librenms@librenms:~$ sudo systemctl stop php7.4-fpm.service

The webpage loaded
Thanks for the assist !!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.