I am trying to set up the demo for my first openhab install (on a raspberry pi) by following this tutorial and i cant seem to get the permissions correctly set to transfer the files to it from my mac.
sudo chown -R openhab /var/lib/openhab/
sudo chown -R openhab /var/log/openhab/
sudo chown -R openhab /etc/openhab/
sudo chown -R openhab /usr/share/openhab/
And it seems to have set the owner correctly. But when log into my rasperry pi by going to Finder -> Go -> Connect to Server -> smb://openhab@raspberrypi.local and login, i am not allowed to delete the OpenHab Config folder.
I am allowed to modify the addons folder inside /usr/share/openhab but not allowed to modify anything inside /etc/openhab it seems.
Here is ls -al of the two directories
pi@raspberrypi:/ $ ls -al /etc/openhab/
total 44
drwxr-xr-x 4 openhab openhab 4096 Feb 7 23:05 .
drwxr-xr-x 109 root root 4096 Feb 4 13:22 ..
drwxr-xr-x 6 openhab openhab 4096 Feb 7 21:45 configurations
-rwxrw-rw- 1 openhab openhab 4096 Feb 7 23:05 ._.DS_Store
-rwxrw-rw- 1 openhab openhab 6148 Feb 7 23:06 .DS_Store
drwxr-xr-x 4 openhab openhab 4096 Feb 4 13:17 jetty
-rw-r--r-- 1 openhab openhab 2583 Feb 2 15:23 logback_debug.xml
-rw-r--r-- 1 openhab openhab 2311 Feb 2 15:23 logback.xml
-rw-r--r-- 1 openhab openhab 145 Feb 2 15:23 login.conf
-rw-r--r-- 1 openhab openhab 302 Feb 2 15:23 quartz.properties
pi@raspberrypi:/ $ ls -al /usr/share/openhab/
total 60
drwxr-xr-x 7 openhab openhab 4096 Feb 7 22:47 .
drwxr-xr-x 182 root root 4096 Feb 4 13:17 ..
drwxrwxrwx 2 openhab openhab 4096 Feb 1 11:21 addons
-rwxrw-rw- 1 openhab openhab 4096 Feb 7 22:47 ._addons
drwxr-xr-x 2 openhab openhab 4096 Feb 4 13:18 bin
lrwxrwxrwx 1 openhab openhab 27 Feb 2 15:23 configurations -> /etc/openhab/configurations
lrwxrwxrwx 1 openhab openhab 27 Feb 2 15:23 contexts -> /etc/openhab/jetty/contexts
-rwxrw-rw- 1 openhab openhab 4096 Feb 7 21:49 ._.DS_Store
-rwxrw-rw- 1 openhab openhab 6148 Feb 7 23:05 .DS_Store
lrwxrwxrwx 1 openhab openhab 22 Feb 2 15:23 etc -> /etc/openhab/jetty/etc
-rw-r--r-- 1 openhab openhab 11232 Feb 2 15:23 LICENSE.TXT
-rw-r--r-- 1 openhab openhab 652 Feb 2 15:23 README.TXT
drwxr-xr-x 6 openhab openhab 4096 Feb 4 13:18 server
drwxr-xr-x 2 openhab openhab 4096 Feb 4 13:18 sounds
drwxr-xr-x 4 openhab openhab 4096 Feb 4 13:18 webapps
so you can see that openhab clearly owns everything, but when i login using samba it cant change anything on /etc/openhab
EDIT: I forced the demo into the folders with root, and when i go to http://raspberrypi.local:8080/openhab.app?sitemap=demo i get ERR_CONNECTION_REFUSED.
So now i have two problems: 1) how do i fix my permissions and 2) Why is this connection refused error popping up now that those files are in place?
EDIT 2: I fixed the ERR_CONNECTION_REFUSED, turns out openhab wasn’t starting on its own because i am running Jessie Raspbian, so the defaults.rc method for starting up doesnt work. I need to use
sudo systemctl daemon-reload
sudo systemctl enable openhab
So back to one problem: Why wont my samba share let me modify /etc/openhab?