1

I'm having issues with write permissions to a SMB share between my 2 RPi4s. I have this SMB mounted on my Win10 PC and I'm able to read/write with no issues.

RPi#1 has a USB HD mounted using fstab: UUID=0042-6478 /media/USB1 auto nofail,uid=1000,gid=1000,umask=0000,noatime 0 0

I then have this setup as a SMB: [Shared] path = /media/USB1 read only=no writeable=Yes create mask=0777 directory mask=0777 public=no force user=pi force group=pi

Now, from RPi#2, I have the SMB share mounted using fstab: //RPi#1-IP/Shared /media/Shared cifs x-systemd.automount,users,credentials=/home/pi/.smbcred 0 0

where I have the credentials for the user "pi" in /home/pi/.smbcred

However, when I try using any accounts that I have on RPi#2, I get a "Permission Denied" error whenever I try to write. I'm only able to write to it if I use "pi" and sudo. Based on my searches, I tried adding the "force user" and "force group" parameters in my smb.conf but still no success.

Any help would be greatly appreciated.

  • Forgot to add my ls -ld output: pi@Plex-RPi:/etc $ ls -ld /media/Shared drwxr-xr-x 2 root root 0 Apr 22 2009 /media/Shared – Gemini Sep 4 at 23:54
  • 1
    Please edit the question and add the additional info from the comment to it. – Ingo Sep 5 at 9:15
  • ls -ld /media/Shared drwxr-xr-x 2 root root .... it's a 'root user' folder. the Other have not the permission to read or write in this directory (only execution). You must create smb user and smb group and assign it to the folder and the conf. – Ephemeral Sep 5 at 15:56
  • On RPi#1? Or #2? On RPi#1 where the USB HD is actually connected to, I created a smb user. Those are the credentials that I put in the .smbcred on RPi#2 to use when mounting. – Gemini Sep 5 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.