OK, we need to step back a bit because I think everyone on the thread is assuming you are running OH installed on Linux. Based on this last post (and the slight hint given the paths that generated the errors in the OP that it was complaining about files in /Users/burnsidecottage/Desktop/openhab-2/...
instead of /var/lib/openhab2
.
Given this, unless you created an openhab
user manually, there is no openhab
user on your OS. When you install openHAB on Linux, it creates an OS user to run openhab under.
In short, yes, that is the original problem. At some point, you ran openHAB using user root. This caused openHAB to create some files. When openHAB creates files it does so as the user it is running under, so those files it created are owned by root and your login user doesn’t have permission to read/write to those files. In all likelihood there are other files under userdata that are also owned by root as well.
Contrary to the advice above, which is the correct advice on an installed openHAB for Linux, you need to change the ownership of the files to the user under which openHAB will be running.
I have no idea how dragging a shell script to a terminal works on a Mac. It would never occur to me to even try it. But that is perhaps something you need to research to figure out what user the script and therefore openHAB itself will run as when you do that. On at least one occasion it ran as user root. That’s all I can say.
Once you understand how all that works, you will know what the ownership for the openHAB files.
Alternatively, you can open the terminal, navigate to the openhab script and run it from the command line. Unless you use sudo, at that point you will know exactly what user openHAB will be running under.
The Karaf console is a command line interface to the “container” in which openHAB runs. The openhab user you see there is specific to openHAB and does not exist in your OS.
In the terminal navigate to the folder where openHAB’s start script is and run ./start.sh
.
As for openHABian, that’s a Debian Linux only thing tuned specifically for the RaspberryPi. It provides a near turn-key solution that include not only openHAB but a dozen or so other third party programs that are commonly used with openHAB preconfigured to work with openHAB as well as a number of tweaks to the underlying operating system. It’s way less work to get up and running with openHABian than pretty much any other approach.
Not necessarily. It just means that you have to run the restore using sudo and you may need to reset the ownership back to your login user.