Failed to fetch version from local git: fatal: detected dubious ownership in repository at '/opt/librenms'

Hi,
the validate output of my LibreNMS shows no errors:

librenms@srv-librenms:~$ ./validate.php

Component Version
LibreNMS 26.9.0-dev.73+9f526a5604 (2026-09-04T17:22:32+02:00)
DB Schema 2026_07_30_162514_add_device_refresh_config_permission (397)
PHP 8.5.10
Python 3.10.12
Database MariaDB 10.6.22-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.10.3
[OK] Dependencies up-to-date.
[OK] Database Connected
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] No errors found with polling frequencies.
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[OK] All 33354 RRD files have the correct step.
[OK] rrdtool version ok
[OK] Connected to rrdcached

Instead the web validation show this error:

FAIL: Failed to fetch version from local git: fatal: detected dubious ownership in repository at ‘/opt/librenms’ To add an exception for this directory, call: git config --global --add safe.directory /opt/librenms

The command

git config --global --add safe.directory /opt/librenms

had no effect

Any suggest? Is it correct that the 2 validation have different result?

Thanks

It is important that you run the check as the same owner of the directory.
If daily is called by a different user, then the directory should also be owned by that user for everything to just work.

Which user are you running this as, and who is the user of . (ls -la)