Configuration permissions

I’ve installed OpenHAB (v1) through apt (using the bintray repo) and am having trouble getting HABMin (also v1) to save my sitemap changes. This is because /usr/share/openhab/configurations is symlinked to /etc/openhab/configurations, which of course is owned by root. What is the recommended procedure to give the openhab user write access to sitemaps etc? Should I simply move the files out of /etc and replace the symlink with the actual directory? This seems a little unsafe since (IIRC) the openhab user gains ownership of /usr/share/openhab at runtime and would thus be exposing openhab.cfg, which contains sensitive data. Not sure how to proceed so grateful for any pointers!

I also would like to know the recommended way to write to the configuration folder (/etc/openhab/configurations).
I just installed openHab to my pi and configured samba to share /etc/openhab/configurations so I can make change from my Mac.
I can’t edit the configuration files unless I ssh as root or log samba as root, which both are bad.

I don’t know whether it’s the recommenended way (I’ve read it somewhere but not sure whether or not the source is trustworthy) but I did a chown of the openhab configuration to my samba user (not the one running samba, but myself on samba) and have set the permission to 644.
I know that this might be a risk but the restrictions are that the openhab user (“openhab”) needs read access. Also, in my oppionion, the problem is not so much whether or not you have read access to the file, but that it contains such information. To make things save, you need to encrypt the data. There is a possility to implement this (just in case someone doubt) which I had done myself during my time as Java developer, but this was loooooong time ago…


Thanks for your reply. I am not very fond of chown the config by a samba user.
I would be interested to know how others do.

If there is a better solution, I’d like to hear it too. One I can think of is the usage of a text editor with integrated ssh client like ultraedit or (i guess) notepad++. But you can’t use the designer then which might be a problem…


bump :slight_smile:

For some reasons, I can’t connect samba anymore as root, so I would really like to know how other properly edit configurations remotely :’(