No write access for Visual Studio Code via Samba to conf directory

Hi,

I needed to re-setup my windows machine but did not touch my openhabianpi installation. However, after reconnecting the samba share and re-installing Visual Studio Code I can read access my files on the share but have no write access anymore.

I tried changing the directory mask in smbd.conf to 0777 and setting a new samba password for user openhab with smbpasswd -a but without success.

When I make samba show its current settings I see the following output:

[16:41:05] openhabian@openHABianPi:/etc/openhab2/items$ openhab-cli info

Version: 2.5.9 (Build)

User: openhab (Active Process 636)
User Groups: openhab tty dialout audio bluetooth gpio

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab2 | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab2/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab2 | openhab:openhabian
OPENHAB_CONF | /etc/openhab2 | openhab:openhabian
OPENHAB_LOGDIR | /var/log/openhab2 | openhab:openhabian
OPENHAB_BACKUPS | /var/lib/openhab2/backups | root:root

What worries me a bit is the different group of user openhab being shown for different directories (openhab or openhabian). Is it possible that this is somehow the root cause, being in the wrong group? I did not change the group though and also do not see a way to change it in the configuration.

Best, Torsten

Do you use openhabian-conf ?
In case you can run fix permissions to fix permissions as well as owner and group of directories.

The directories should belong to group openhab and openhabian should be member of the group openhab.

what is the output of the command

mount

Running fix permissions unfortunately does not change anything. The directories do belong to group openhab and openhabian is a member.

The mount command outputs the following:

/dev/sda1 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=494908k,nr_inodes=123727,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda1 on /srv/openhab2-sys type ext4 (rw,noatime)
/dev/sda1 on /srv/openhab2-conf type ext4 (rw,noatime)
/dev/sda1 on /srv/openhab2-logs type ext4 (rw,noatime)
/dev/sda1 on /srv/openhab2-userdata type ext4 (rw,noatime)
/dev/sda1 on /srv/openhab2-addons type ext4 (rw,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=99900k,mode=700,uid=1000,gid=1000)

Did you reconnect with the new password in windows? Sounds like a windows problem if that is what was reloaded.

I have in the past needed to connect manually with net use using the command line in windows. Ask you may have to run net use delete to clear the connection first.