Can't Change Device Name

I made some changes to IPs on my network and now I can’t change the IP within Librenms.

I have Centos 7 running apache.

I get the error: Renaming of 10.x.x.x failed . Does your web server have permission to modify the rrd files?

I have ran the permissions commands in the Centos7/apache install document as below.


Set permissions
chown -R librenms:librenms /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs


Is there anything else that could be missing?

run ./validate.php see if you have any errors

1 Like

====================================

Component Version
LibreNMS 1.32-47-gcdf31c4
DB Schema 211
PHP 7.0.20
MySQL 5.5.52-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Database connection successful
[OK] Database schema correct
[WARN] Your install is over 24 hours out of date, last update: Mon, 16 Oct 2017 10:56:47 +0000

weird … try this https://docs.librenms.org/#Support/FAQ/#faq16

Could it be that the following is missing?
usermod -a -G librenms apache

1 Like

I did that command too already.

In my setup all the files and directories are owned by www-data because of this issue.
Now I can rename and remove the files.

This is what I have in my /opt/librenms directory. I don’t see it a renamehost script.

drwxr-xr-x. 21 librenms librenms 4096 Oct 17 11:27 .
drwxr-xr-x. 4 root root 32 Jun 23 17:41 …
-rwxr-xr-x. 1 librenms librenms 7651 Jul 14 00:15 addhost.php
-rwxr-xr-x. 1 librenms librenms 860 Jun 23 17:41 adduser.php
-rwxr-xr-x. 1 librenms librenms 1807 Jul 4 00:15 alerts.php
-rw-r–r–. 1 librenms librenms 10800 Oct 6 00:15 AUTHORS.md
-rwxr-xr-x. 1 librenms librenms 6294 Jun 23 17:41 billing-calculate.php
-rwxr-xr-x. 1 librenms librenms 1507 Jul 19 00:15 build-base.php
-rw-r–r–. 1 librenms librenms 53935 Jun 23 17:41 build.sql
drwxr-xr-x. 2 librenms librenms 45 Jun 23 18:00 cache
-rw-r–r–. 1 librenms librenms 144 Jun 23 17:41 CHANGELOG
-rwxr-xr-x. 1 librenms librenms 1857 Jun 23 17:41 check-services.php
-rw-r–r–. 1 librenms librenms 659 Jun 23 17:41 .codeclimate.yml
-rw-r–r–. 1 librenms librenms 92 Jul 22 00:15 CODE_OF_CONDUCT.md
-rw-r–r–. 1 librenms librenms 1876 Sep 22 00:15 composer.json
-rw-r–r–. 1 librenms librenms 2075 Jun 27 12:10 config.php
-rw-r–r–. 1 librenms librenms 1834 Jun 23 17:41 config.php.default
-rwxr-xr-x. 1 librenms librenms 253 Jun 25 00:15 config_to_json.php
drwxr-xr-x. 2 librenms librenms 76 Aug 9 00:15 contrib
-rw-r–r–. 1 librenms librenms 179 Jun 23 17:41 CONTRIBUTING.md
-rwxr-xr-x. 1 librenms librenms 876 Jun 23 17:41 cronic
-rw-r–r–. 1 librenms librenms 7170 Sep 20 00:15 daily.php
-rwxr-xr-x. 1 librenms librenms 8868 Sep 20 00:15 daily.sh
-rwxr-xr-x. 1 librenms librenms 566 Jun 23 17:41 delhost.php
-rwxr-xr-x. 1 librenms librenms 5049 Jul 18 00:15 discovery.php
-rwxr-xr-x. 1 librenms librenms 13350 Jun 23 17:41 discovery-wrapper.py
-rwxr-xr-x. 1 librenms librenms 2229 Jun 23 17:41 dist-pollers.php
drwxr-xr-x. 10 librenms librenms 179 Sep 20 00:15 doc
-rw-r–r–. 1 librenms librenms 340 Jun 23 17:41 .editorconfig
drwxr-xr-x. 8 librenms librenms 198 Oct 17 00:15 .git
drwxr-xr-x. 2 librenms librenms 63 Jul 7 00:15 .github
-rw-r–r–. 1 librenms librenms 428 Aug 20 00:15 .gitignore
drwxr-xr-x. 9 librenms librenms 4096 Oct 13 00:15 html
drwxr-xr-x. 11 librenms librenms 4096 Oct 17 00:15 includes
-rwxr-xr-x. 1 librenms librenms 980 Jun 23 17:41 irc.php
drwxr-xr-x. 15 librenms librenms 269 Jun 23 17:41 lib
drwxr-xr-x. 9 librenms librenms 4096 Sep 22 00:15 LibreNMS
-rw-r–r–. 1 librenms librenms 490 Jun 23 17:41 librenms.cron
-rw-r–r–. 1 librenms librenms 734 Jun 23 17:41 librenms.nonroot.cron
drwxr-xr-x. 2 librenms librenms 50 Jun 23 17:41 licenses
-rw-r–r–. 1 librenms librenms 35334 Jun 23 17:41 LICENSE.txt
drwxrwxr-x+ 2 librenms librenms 78 Jun 24 00:15 logs
-rw-r–r–. 1 librenms librenms 1813 Jun 23 17:41 Makefile
-rw-r–r–. 1 librenms librenms 648 Jun 23 17:41 .mention-bot
drwxr-xr-x. 140 librenms librenms 20480 Oct 16 00:15 mibs
drwxr-xr-x. 2 librenms librenms 174 Oct 17 00:15 misc
-rw-r–r–. 1 librenms librenms 5413 Oct 3 00:15 mkdocs.yml
-rwxr-xr-x. 1 librenms librenms 3841 Jun 23 17:42 pbin.sh
-rw-r–r–. 1 librenms librenms 350 Aug 8 00:15 phpunit.xml
drwxr-----. 3 librenms librenms 19 Jun 23 19:25 .pki
-rwxr-xr-x. 1 librenms librenms 6329 Jun 23 17:42 poll-billing.php
-rwxr-xr-x. 1 librenms librenms 5710 Jun 23 17:42 poller.php
-rwxr-xr-x. 1 librenms librenms 14369 Jun 23 17:42 poller-service.py
-rwxr-xr-x. 1 librenms librenms 13149 Jun 23 17:42 poller-wrapper.py
-rw-r–r–. 1 librenms librenms 480 Jun 23 17:42 readmegen.yml
-rw-r–r–. 1 librenms librenms 10817 Jun 23 17:41 README.md
-rwxr-xr-x. 1 librenms librenms 845 Jun 23 17:42 renamehost.php
drwxrwxr-x+ 12 librenms librenms 224 Jul 7 12:05 rrd
drwxr-xr-x. 5 librenms librenms 4096 Oct 3 00:15 scripts
-rw-r–r–. 1 librenms librenms 182 Jun 23 17:41 .scrutinizer.yml
-rwxr-xr-x. 1 librenms librenms 13274 Jun 23 17:42 services-wrapper.py
-rw-r–r–. 1 librenms librenms 65 Jun 23 17:42 snmp.conf.example
-rw-r–r–. 1 librenms librenms 466 Jun 23 17:42 snmpd.conf.example
-rwxr-xr-x. 1 librenms librenms 8342 Jul 18 00:15 snmp-scan.py
-rwxr-xr-x. 1 librenms librenms 993 Jun 23 17:42 snmptrap.php
drwxr-xr-x. 2 librenms librenms 8192 Oct 17 00:15 sql-schema
-rwxr-xr-x. 1 librenms librenms 602 Jun 23 17:42 syslog.php
drwxr-xr-x. 5 librenms librenms 4096 Oct 6 00:15 tests
-rw-r–r–. 1 librenms librenms 1671 Sep 20 00:15 .travis.yml
-rwxr-xr-x. 1 librenms librenms 24996 Sep 20 00:15 validate.php
drwxr-xr-x. 17 librenms librenms 257 Sep 22 00:15 vendor

What is www-data?

Thats the username that my webserver (apache) uses.

File you’re searching for is renamehost.php wich is in your list.

1 Like

Ah, yes. The light green color the name had on my screen threw me off.

Ok, I did the rename from the command prompt and it worked. Thanks for that!

Still have no idea then why that would work but from GUI would not? Anything else I can check?

I guess it is because of the user underwich the webserver runs that doesn’t have write permissions to the required files.
Wich webserver do you use?

Could you tell the groups of the librenms user?

grep librenms /etc/group

apache… I did the permissions as required by the install document. I placed the commands I followed above.

id apache - member of librenms group? Perhaps usermod -a -G librenms apache may fix your issue.