Addons director not showing in sambashare for user habian

  • Hardware: _Intel i7, 8Gb Ram, 256Gb SSD, laptop Dell Latitude 7240.
  • Debian 10, OpenHabian 2.5.3
  • Issue of the topic: addons directory not visible

I installed a new clean OpenHabian 2.5.3 on my new (okay: second hand) laptop running Debian 10. I want to add the OTGW-binding which is not in PaperUI, so I have to put the Jar-file in the addons directory.
I have the samba share on my win-pc and I remember addons should be in openhab-share. But this directory is empty!

What I found (but I don’t understand or know how to go from here):
/usr/share/openhab2/addons exists and has properties: drw xrw xr-x+
and user/group both ‘openhab’.

in /etc/samba/smb.conf it says about this share:
create mask =0664
directory mask=0775

The user I login with is ‘habian’! Not ‘openhab’. But I do not remember how that was on my older system which crashed (several times so I gave up, system gets too hot).
I think my problem is that my username is not the user/group of the directory. But as I said: I don’t know for sure if this is the problem, and I don’t know how best to fix.
I hope you can help me.

Unless you manually install an add-on by copying a jar file to that directory, it’s supposed to be empty.

Rich, thank you for your reply.
What I meant is not that the addons-directrory is empty. What I meant is: the samba-share-directory where I expect the addons-directory (openhab-share) is empty. Through samba, I cannot see the addons-directory!
And I think this is because I work as user ‘habian’ while the directory has owner and group ‘openhab’. But I don’t know if this is the real reason.
If I do: ‘chown habian:habian /usr/share/openhab2/addons’, will opanhab still work?
I already tried the habian-config menu item ‘set passwords’ but this doesn’t help me. Therefor I think it’s the user that is somehow not correct in stead of the password.

No, that wouldn’t be the reason. Not having permission to read the folder doesn’t hide the fact that the folder exists. As far as I’m aware, the addons folder has never been shared over samba with openHABian. Only the conf and userdata folders are shared. But I don’t use samba shares so I can’t say this definitively.

You definitely do not want to change the ownership of those folders. habian may need to write to those folders on rare occasions but openhab needs to read from it all the time.

You probably need to edit the samba config to share the addons folder.

I’m 90% certain that it was available through samba, cause I wouldn’t how else to drop the jar-file in this directory from a windows pc. Okay, not 100% ;-).
In sambashare, the parent-dir of ‘addons’ is already shared. Shouldn’t addons be ashered then?
Anyway, I added config for addons in smb.conf. Rebooted (samba wouldn’t restart)
This is my config in smb.conf:

; comment=openHAB2 addons
; path=/usr/share/openhab2/addons
; writeable=yes
; public=no
; create mask=0664
; directory mask=0775
; veto files = /Thumbs.db/.DS_Store/..DS_Store/.apdisk/.*/
; delete veto files = yes

; comment=openHAB2 log files
; path=/var/log/openhab2
; writeable=yes
; public=no
; create mask=0664
; directory mask=0775
; veto files = /Thumbs.db/.DS_Store/..DS_Store/.apdisk/.*/
; delete veto files = yes

But my windows-pc still doesn’t see the addons-dir.

Why not just ftp the file over you will most likely have to login to change permissions anyway. You can use winscp.

Also if using openhabian menu go reinstall samba. Addons is shared, but for me even after I drop the file in the permission are wrong. I never trouble shot I just get the jar file to my openHAB box somewhere then login move it to correct place and set permissions.

I didn’t think of re-installing samba! That worked! Now my addons folder is in the samba-share. Thank you very much.

1 Like