Add/edit files with openhab user?

Hey guys,
I used OH1 in my old apartment, but new house, new server so I started with the new OH2 stable release. I installed on my debian 8 box with apt-get per this doc. All is great and I got my Wemo devices recognized and I can control them, no problem.

However, now I am trying to set up a sitemap. The install on /etc/openhab2 is owned by user:group openhab:openhab. I can of course add and edit files as root, but then they are owned and read/writeable only by root (when I use sudo).

This doc here talks about editing sitemap files, but I’m not sure the “correct” way to do so. I did some poking around on this site and I found this post looking for the default password, but he is using samba, which I am not.

I tried su - then su - openhab, but whoami results in still being root. I understand I can use sudo -u openhab <command>, but that gets tedious for lots of adds/edits.

So, I guess my question is, what is the best practices way to add/edit sitemaps, etc directly to the file system?

Add your regular user to the openhab group. I believe by default all the config files have group write permissions.

The directories are not group writeable though:

squirrel@oaktree:/etc/openhab2$ ll
total 44
drwxr-xr-x 2 openhab openhab 4096 Jan 22 18:01 html
drwxr-xr-x 3 openhab openhab 4096 Jan 22 18:01 icons
drwxr-xr-x 2 openhab openhab 4096 Jan 22 21:49 items
drwxr-xr-x 2 openhab openhab 4096 Jan 22 18:01 persistence
drwxr-xr-x 2 openhab openhab 4096 Jan 23 22:03 rules
drwxr-xr-x 2 openhab openhab 4096 Jan 22 18:01 scripts
drwxr-xr-x 2 openhab openhab 4096 Jan 22 18:01 services
drwxr-xr-x 2 openhab openhab 4096 Jan 24 09:14 sitemaps
drwxr-xr-x 2 openhab openhab 4096 Jan 22 18:01 sounds
drwxr-xr-x 2 openhab openhab 4096 Jan 23 11:37 things
drwxr-xr-x 2 openhab openhab 4096 Jan 22 18:01 transform
squirrel@oaktree:/etc/openhab2$ 

Once I added squirrel to the openhab group, logged out and logged back in and did a sudo chmod 775 /etc/openhab2/* I was able to write to those directories.

Hmmm, it may be something different between how I’m running in Docker and the apt-get install. But it looks like you got it sorted out.