- Platform information:
- Hardware: Raspberry Pi 3 Model B Rev 1.2_
- Host: rpi3ohv2 Kernel: 5.4.51-v7+ armv7l bits: 32 Console: tty 2
- Distro: Raspbian GNU/Linux 10 (buster)
- OpenJDK Runtime Environment (Zulu 8.31.1.122-linux_aarch32hf) (build 1.8.0_181-b122)
- Version: 2.5.11 (Build) (apt-get), text-based config
- binding = astro, exec, logreader, network, ntp, systeminfo, fritzboxtr0641, expire1, mqtt1, weather1
- ui = paper, basic, classic, restdocs
- persistence = rrd4j, mapdb
- action = mail, mqtt
- transformation = map, javascript, xslt, scale, jsonpath
I had a look at the docs, on how to install the samba share to access the OH config. I have the same config; and it has been working for a while⦠but no longer does⦠and I canāt figure out what the problem is.
The docs also say how to mount it on Windows and Mac, but not Linux.
The openHAB pi (rpi3ohv2) has this share:
[OpenHAB Config]
comment = openHAB site config
path = /etc/openhab2
browseable = yes
writeable = yes
only guest = no
public = no
create mask = 0777
directory mask = 0777
force user = openhab
force group = openhab
The OH directory shows this:
# [2021-04-03 13:42] maxg@rpi3ohv2 /etc/openhab2 $
la
total 76
drwxr-xr-x 17 openhab openhab 4096 Feb 2 12:29 .
drwxr-xr-x 100 root root 12288 Mar 13 13:23 ..
drwxrwxrwx 7 openhab openhab 4096 Apr 3 11:23 .git
drwxrwxrwx 2 openhab openhab 4096 Feb 9 2019 helpers
drwxr-xr-x 3 openhab openhab 4096 Feb 2 05:29 html
drwxr-xr-x 3 openhab openhab 4096 Jan 1 2019 icons
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 items
drwxr-xr-x 2 openhab openhab 4096 Apr 21 2020 misc
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 persistence
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 rules
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 scripts
drwxr-xr-x 2 openhab openhab 4096 Feb 2 21:10 services
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 sitemaps
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 sounds
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 things
drwxr-xr-x 2 openhab openhab 4096 Feb 2 05:29 transform
drwxrwxrwx 2 openhab openhab 4096 Nov 12 20:26 .vscode
I used to version-control the OH config via VScode, but get this error when saving:
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
error: insufficient permission for adding an object to repository database .git/objects
error: insufficient permission for adding an object to repository database .git/objects
error: Error building trees
The ./git directory looks like this:
# [2021-04-03 13:43] maxg@rpi3ohv2 /etc/openhab2 $
la .git/
total 116
drwxrwxrwx 7 openhab openhab 4096 Apr 3 13:45 .
drwxr-xr-x 17 openhab openhab 4096 Feb 2 12:29 ..
-rwxrw-rw- 1 openhab openhab 18 Apr 3 13:45 COMMIT_EDITMSG
-rwxrw-rw- 1 openhab openhab 130 Aug 26 2019 config
-rwxrw-rw- 1 openhab openhab 73 Aug 26 2019 description
-rwxrw-rw- 1 openhab openhab 23 Aug 26 2019 HEAD
drwxrwxrwx 2 openhab openhab 4096 Aug 26 2019 hooks
-rw-rw-r-- 1 pi pi 70998 Apr 3 09:51 index
drwxrwxrwx 2 openhab openhab 4096 Aug 26 2019 info
drwxrwxrwx 3 openhab openhab 4096 Aug 26 2019 logs
drwxrwxrwx 253 openhab openhab 4096 Dec 13 10:22 objects
drwxrwxrwx 4 openhab openhab 4096 Aug 26 2019 refs
My remote machine (a PC running Mint) uses fstab to mount the OH share:
# [2021-04-03 12:55] maxg@maxg-pc-mint ~/openhab $
cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=9c2109ea-b7d9-4508-8843-e4e5cc455e69 / ext4 errors=remount-ro 0 1
UUID=c461a998-27f0-44b6-bde1-31feae231902 none swap sw 0 0
# 191103-1921 MaxG: added "Data SSD" to auto-mount; see \040 to express the space
UUID=3C1E04101E03C23E /media/maxg/Data\040SSD ntfs auto 0 0
# 180419-2051 MaxG: permanently mount the hpserver SAMBA shares (this works)
//HPSERVER/Music /home/maxg/hpserver/music cifs vers=1.0,username=Administrator,password=xxxxx,uid=1000,gid=1000
192.168.1.5:/etc/openhab2 /home/maxg/openhab nfs4 _netdev,auto 0 0
When I list the OH folder on the local machine, I see this:
# [2021-04-03 13:06] maxg@maxg-pc-mint ~/openhab $
la
total 68
drwxr-xr-x 17 dnsmasq avahi-autoipd 4096 Feb 2 12:29 .
drwxr-xr-x 75 maxg maxg 4096 Apr 3 09:49 ..
drwxrwxrwx 7 dnsmasq avahi-autoipd 4096 Apr 3 13:45 .git
drwxrwxrwx 2 dnsmasq avahi-autoipd 4096 Feb 9 2019 helpers
drwxr-xr-x 3 dnsmasq avahi-autoipd 4096 Feb 2 05:29 html
drwxr-xr-x 3 dnsmasq avahi-autoipd 4096 Jan 1 2019 icons
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 items
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Apr 21 2020 misc
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 persistence
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 rules
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 scripts
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 21:10 services
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 sitemaps
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 sounds
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 things
drwxr-xr-x 2 dnsmasq avahi-autoipd 4096 Feb 2 05:29 transform
drwxrwxrwx 2 dnsmasq avahi-autoipd 4096 Nov 12 20:26 .vscode
If I want to create a file on the mounted remote OH system I get a permission error.
# [2021-04-03 13:53] maxg@maxg-pc-mint ~/openhab $
touch delete.me
touch: cannot touch 'delete.me': Permission denied
Any hints appreciated.
[edit1] Just to be sure it is not the local machine, I ran:
sshfs maxg@rpi3ohv2:/etc/openhab2 /home/maxg/oh
⦠on my notebook, which can also not create a file on the remote OH share.
[/edit1]
[edit2] I forgot to say that I (maxg) am a member of the openhab group on the OH machine.
I also changed the file rights (from 755) to 775⦠which did not change the outcome.
I also forgot to say that I can in VSCode modify existing files, but cannot create new ones.
[/edit2]