Chown on samba

I just installed openhab on Ubuntu following the documentation at

I’m at the point of making the config files accessible and in that doc it says to run:

sudo chown -hR openhab:openhab /etc/openhab2 /opt/openhab2/conf

There is no openhab2 folder under opt and no conf folder anywhere on my system. Thoughts?

Note I followed the package install process on Ubuntu.



Hi @jriker1,

You’ve installed it via a package which means everything is done for you. The part about changing ownership is under the “Manual Instructions” which is an alternative installtion method. You’ve simply scrolled too far :wink:

After installing the package, you need only start openHAB using:

sudo systemctl start openhab2

If you want to start openHAB automatically on boot or crash use:

sudo systemctl enable openhab2

If you’re interested where everything is installed, you can use the openhab-cli commands:

openhab-cli info

Hope that helps!

Right but the Samba access is not enabled as part of the package install. Guessing package or manual that Samba section is still relevant? Says there are samba settings specifically for package installs. Unless I do not need to change owner.


That’s correct, /etc/openhab2 is the package installation’s conf directory, which should already have openhab:openhab ownership.

That part in the docs is a little confusing I’d admit, I’ll look at clarifying it!

Thanks Ben,

I thought as much with the path but didn’t check the permissions so ran:

sudo chown -hR openhab:openhab /etc/openhab2

guess it won’t hurt.

1 Like

To help with making read/write access easier via the share I’ve had success with the following share parameters in my smb.conf

comment = OpenHAB2
path = /etc/openhab2/
writeable = yes
hide dot files = yes
guest ok = yes
inherit permissions = yes
force user = openhab
force group = openhab

Using the last two lines I believe allows you as a guest to be spoofed in as the openhab user and have permission to change the files.

Right, but only if guests are allowed to write at all.
But if there is another user configured at openHAB machine, like mywindowsuser (the same user name as on your windows PC)

sudo adduser mywindowsuser

one can setup this user to be allowed to use samba shares:

sudo smbpasswd mywindowsuser

will ask for a samba password for mywindowsuser. Set the same password as set in windows, this way your windows PC will connect to samba without asking any user or password at all, and the files are written as user openhab