Hi,
probably a stupid question, but I don’t understand it, so I thought I’d ask:
I run Weathermap on my system and it used to work fine. After six months or so I just accessed the editor again and was greeted with " The map config directory is not writable by the web server user. You will not be able to edit any files until this is corrected. [WMEDIT01]<p>"
Should be a simple fix, so I went and did a a+w on configs & output. This didn’t help though, so i checked more in depth.
I found that www-data is actually member of the librenms group so should have had full access in the first place (with 775 in place).
Still doesn’t work, so checked editor.php and edited a few debug prints.
Its running as www-data as expected and touching a file in configs did not work, so the is_writable test seems to be correct - just why?
I have this on both of my installations, so I think its a Librenms issue rather than a Weathermap issue…
Any ideas? Thanks:)
configs dir (ls -la configs):
-rwxrwxrwx 1 librenms librenms 33 Oct 29 2017 .htaccess
-rw-rw-rw- 1 librenms librenms 51 Jul 30 2018 index.php
-rw-rw-rw- 1 librenms librenms 817 Oct 1 2018 dummy.conf
-rw-rw-rw- 1 librenms librenms 647 Oct 5 2018 PORTTEMPL.config
drwxrwxrwx 2 librenms librenms 4096 Feb 9 22:32 .
-rw-rw-rw- 1 librenms librenms 5929 Apr 1 23:16 Backbone.conf
drwxrwxr-x 9 librenms librenms 4096 May 19 09:59 …
groups www-data
www-data : www-data librenms
grep mapdir editor.php
$mapdir=‘configs’;
if(! is_writable($mapdir))
if (touch($mapdir.‘/writetest.tmp’)) {
print (“touch(”.$mapdir.“/writetest.tmp) successful”);
print (“touch(”.$mapdir.“/writetest.tmp) failed”);
$mapfile = $mapdir.‘/’.$mapname;
$sourcemap = $mapdir.‘/’.$sourcemapname;
$check_base = realpath($mapdir);
./validate.php
Component | Version |
---|---|
LibreNMS | 1.51-59-gd6bb9f0 |
DB Schema | 2019_02_10_220000_add_dates_to_fdb (132) |
PHP | 7.3.5-1+ubuntu16.04.1+deb.sury.org+1 |
MySQL | 10.0.38-MariaDB-0ubuntu0.16.04.1 |
RRDTool | 1.5.5 |
SNMP | NET-SNMP 5.7.3 |
==================================== |
[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct