Problems to access OH folders with samba

Tags: #<Tag:0x00007efecc4dc7f0>

Hi there,

i am in the process to setup a new system with oh3. The system is a virtual machine based on debian 10.6 on a synology hardware.

I use openhabian as a blue print to set it up. Process is very simple and i learn a lot about shell programming. I goto github an study all the commands. Until now everything worked perfect. oh3 is running and i tried to setup samba to access all files from my Windows machine.

If i setup the standard from openhabian the configuration of shares is pointing to the original folder. For the conf files it is like this:

[openHAB-conf]
  comment=openHAB site configuration
  path=/etc/openhab
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

With this configuration i am able to access all files and change them or create new ones. Fine.

In another setup step all the different folders are collected in /srv with a bind mount (very interesting thing that). If use this path in samba like in the next example i could access the folder but has no rights.

[openHAB-conf]
  comment=openHAB site configuration
  path=/srv/openhab-conf
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

As far as i can see there are no differences in the access rights. Has someone an idea?

Thanks
Thomas

I don’t know that you’ll find a whole lot of Samba experts on this forum. Almost all of those who use it use what openHABian does for them. You might need to go look through the

But if you are using VSCode you don’t need Samba. You can use the Remote SSH extension pack. I’m pretty sure it has support for RPis now. Then all you need to do is configure SSH and you can edit the files in place on the host itself.

Beyond that, what user is Samba configured to work as? The Samba config is more than just that section. There is also a config somewhere that sets up users and permissions that are allowed to connect. Maybe there is something in the global section…ls
I’ve only memories of this and no practical experience. I don’t have any Windows machines any more so I haven’t messed with Samba in years.

what are your rbind command parameters ?

I use the standard opehabian template and set permission like in openhabian

[Unit]
Description=openhab-conf mount
DefaultDependencies=no
Before=smbd.service
After=zram-config.service

[Mount]
What=/etc/openhab
Where=/srv/openhab-conf
Type=none
Options=bind

[Install]
WantedBy=multi-user.target

At the end i am able to use remote VSC odr teh direct path in Samba. so the problem ist not to create a working system. i Like to understand why the pathes are different even if the target is the same.

Solved it. Using mount binds default on debian 10.6 seams to be read only. adding a rw to the Options does the trick