When files in /etc/openhab2/services do not have Read permission for Others, karaf says :
Could not process config file ‘mqtt.cfg’: /etc/openhab2/services/mqtt.cfg (Permission denied)
The rights on the directory and the example file :
drwxr-xr-x 2 root openhab 4096 Oct 21 11:50 .
-rw-r----- 1 root openhab 1538 Oct 21 11:50 mqtt.cfg
As this directory contains clear text passwords for connecting to services, I do not want to give a read permission to Others on the files (and this is not needed).
The question I can’t figure out is : with what user does it tries to access the file ? The main process runs as the user openhab.
I’ve made more investigations today and it appears that openhab can read the file correctly with no permissions for Others, and files owned by root (i.e. just with read rights for the openhab group).
The logger reports “permission denied”, but openhab reads the file and takes it into account.
I come to the conclusion that a bug makes the logger report a false alert.