Reputation: 11
I installed Raspbian Lite and Samba on my Raspberry Pi 4b. Below is my smb.conf file.
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = no
guest ok = no
[home]
path = /mnt/raid1
writeable = yes
create mask = 0777
directory mask = 0777
public = no
read only = no
browseable = yes
I access the server from a Windows 10 and a Linux (Ubuntu 18.04.5 LTS) client. Everything works fine on the Windows client. The first time I try to open a folder that is on the Raspberry Pi via the VS Code Command Line Interface(CLI) code
after logging into the Linux client, it works. However, every additional time I try to open a folder that is located on the NAS via code
, no matter which flag I use, I get the following error:
cannot stat path of the current working directory: Permission denied
When I use vim to open a folder on my NAS, everything works fine. In addition, the workspace for the Eclipse IDE is stored on the Raspberry Pi, and Eclipse has no problem with that. I can change and save files on the NAS except with the CLI code
.
I only get this error from the VS Code Command Line Interface when working with folders stored on the NAS. When I work on my local hard drive or an external hard drive, there are no errors. Even if I open VS Code via the desktop icon and open a folder that is stored on the NAS in the GUI, no error occurs here either.
Below are the rights and owner of the mount point from my NAS on my Linux client
rwxr-xr-x niko niko (niko is the user account on my Linux client)
Here are the rights and owners of the folders on the mount point of my hard drive on the Raspberry Pi, which can be accessed over the network using SMB protocol
drwxr-xr-x 7 pi pi
├── some folder
├── drwx------ 2 pi pi
├── some folder
├── drwx------ 4 pi pi
│ ├── drwxrwxrwx 2 pi pi
│ └── drwxrwxrwx 3 pi pi
│ └── drwxrwxrwx 20 pi pi
│ ├── drwxrwxrwx 41 pi pi
│ └── -rwxrw-rw- 1 pi pi
└── some folder
Here is the line from /etc/fstab
I use to automount the Samba server
//192.168.178.96/home /media/samba cifs credentials=/Path/To/My/Credentials,users,uid=1000,gid=1000 0 0
Here are the extensions I installed for VS Code in case the error could have something to do with an extension:
I also have a permission problem when trying to install anaconda3 on the NAS. Here is the link to my other question, I guess these two are related.
Thanks in advance for your help and feedback.
Upvotes: 1
Views: 2530