Openhab3 Ubuntu Snap installation permission problem

  • Platform information:Openhab3
    • Hardware: Intel® Core™2 Duo CPU E7500 @ 2.93GHz × 2
      *Ram :- 2GB
    • OS: Ubuntu 20.04

I have installed Ubuntu 20.04 on HP desktop and installed openhab3 using software store(Snap).
Openhab installed successfully and it run without anyh problem.
i have checked web interface using localhost:8080 url.
i am able to create items, things, rules using webUI.
I search Openhab config file path which is :- /snap/openhab/893/conf
i tried to create .items file but system shows permission denied.
i format PC twice and install Ubuntu20.04 and Openhab following same procedure.

one thing i understand is if i installed openhab using Software store(Snap) then all config files are stored in Snap folder which are readonly.

kindly guide how can i edit config files.

The openHAB Linux page does not list that as an official supported packaging. You need to get support from whoever packaged it into snap.

This folder is not readonly for every user on the system or OH wouldn’t be able to do anything through the UI. The trick here is that you also need to grant yourself permission to edit files in that directory without cutting off OH’s permissions.

I don’t know the specifics of the snap installation, but the general answer to your question is that the /snap/openhab/893/conf folder has been created for use with a user that is not your basic login account. It probably also created a group for that user and gave that group write permissions to the folder as well. You need to add your login user to the group that has access to that folder.

There are different ways to do this depending on what desktop you are using, but to do it via the command line you’ll need to learn about the ls -ld command to see what the user and group permissions of that folder are, and the usermod command to add your user to the correct group.

1 Like