I want to edit some files using Visual Studio Code. The files are saved on RaspberyPi, the shared folder of which is mounted in fstab on my Ubuntu 18.04.
Configuration smb.conf on RPi`
[openHAB-conf]
comment=openHAB2 site configuration
path=/etc/openhab2
writeable=yes
public=yes
create mask=0777
directory mask=0777
veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
delete veto files = yes
fstab configuration (on Ubuntu)
fstab:
//192.168.1.130/openHAB-conf /home/t/OH2/etc cifs defaults,username=XXX,password=XXX,file_mode=0777,dir_mode=0777,noperm 0 0
Result of /home/t/OH2/ ls -l :
drwxrwxrwx 2 t root 0 kwi 21 13:55 etc
I can't change group owner using chgrp, it doesn't work, but I can change file/folder onwer.
Finally - I may open files on VCode but I can't write any changes. There's always a message (and authorising as a root in a popup window doesn't work neither):
Failed to save 't.items': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.
If I use sudo code --user-data-dir="/home/t/OH2/etc" there's no any problem. But according to explanantion Why is it bad to log in as root? that it is not advisable.
Any advice?