[OH3, Ubuntu] Permission issue for persisting data with rrd4j

Dear Community,

Yesterday I ran into this issue, that my dummy switch which is linked to a channel creates some log files which are showing that there are some problems with the persistence, see:

00:57:27.087 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'JobaDevSwitch' changed from OFF to ON
00:57:27.091 [ERROR] [rd4j.internal.RRD4jPersistenceService] - Could not create rrd4j database file '/var/lib/openhab/persistence/rrd4j/JobaDevSwitch.rrd': /var/lib/openhab/persistence/rrd4j/JobaDevSwitch.rrd (Permission denied)

Thanks in advance for some advice, how to solve this? Moreover thanks for some additional advice to get to the root of this issue.

Best regards,

My advice is to provide more information. We do not know how you installed OH or what troubleshooting steps you have already tried. It appears to either be a permissions or disk space issue which would be OS related, outside of OH.

Thanks Bruce,

I used the default Ubuntu-way by apt, see openHAB on Linux | openHAB
The system is running on Ubuntu 20.04. Ubuntu runs in a virtual machine on a windows host. Of course I can set the permissions properly on my system, but I guess this will be an issue which got its origin somewhere else.

Repository is only one way. Manual zip file & Docker are alternatives, for instance.

If the permissions are indeed incorrect, you should open an issue on GitHub, likely for the distro to get it fixed.

Dear Bruce,

Thanks - I got the same idea, so I am wondering if anyone else used the apt-installation and the same occured?

I will file an issue on github after I got some feedback here.


Interesting - one of the persistence file was added to owner root and group root instead of openhab (like the others). I changed it and all runs smoothly.

1 Like

I observed the same behaviour, when using a .things file - the files which should be generated in /var/lib/openhab/jsondb have the user and group root instead of openhab. I guess it is the right time to create a ticket on github. I will go for it.

Lösung ist auf der Ubuntu-Maschine dann übrigens der Kommandozeilenbefehl:
sudo chown --recursive openhab:openhab /var/lib/openhab/jsondb

That raises the question if openHAB is running as a user, how did it get root access??