I have issue with persitence that causes OH freeze after some time.
[ERROR] [d4j.internal.RRD4jPersistenceService] - Could not create rrd4j database file '/var/lib/openhab/persistence/rrd4j/pcpSalonTV_CurrentPlayingTime.rrd': /var/lib/openhab/persistence/rrd4j/pcpSalonTV_CurrentPlayingTime.rrd (Permission denied)
I’ve checked permissions and I’ve got:
[10:48:51] root@openHABianDevice:/var/lib/openhab# ls -ld /var/lib/openhab/
drwxrwxr-x 9 openhab openhab 4096 Jan 3 19:51 /var/lib/openhab/
[10:54:02] root@openHABianDevice:/var/lib/openhab# ls -ld /var/lib/openhab/persistence/
drwxrwxr-x 1 openhabian openhabian 4096 Jan 3 19:55 /var/lib/openhab/persistence/
I’m not sure what is the root cause, but I presume that the owenrship should be ‘openhab’ instead ‘openhabian’ so I’ve changed it manually, however it went back by itself to ‘openhabian’ anyway.
Tried “fix permissions” from openhabian-config, but I’ve got error
2021-01-04_10:58:59_CET [openHABian] Applying file permissions recommendations... FAILED (openhab folders)
Manually it worked, but after running OH3 again, the problem went back:
[10:59:37] root@openHABianDevice:/var/lib/openhab# sudo chown -R openhab:openhab /var/lib/openhab
[11:00:57] root@openHABianDevice:/var/lib/openhab# ls -ld /var/lib/openhab/persistence/
drwxrwxr-x 1 openhab openhab 4096 Jan 3 19:55 /var/lib/openhab/persistence/
after restart:
[11:11:51] root@openHABianDevice:/home/openhabian# ls -ld /var/lib/openhab/persistence/
drwxrwxr-x 1 openhabian openhabian 4096 Jan 4 11:07 /var/lib/openhab/persistence/
[11:11:56] root@openHABianDevice:/home/openhabian# ls -ld /var/lib/openhab/
drwxrwxr-x 9 openhab openhab 4096 Jan 4 11:05 /var/lib/openhab/
How to fix it?