1

I have an issue when I want to write to a raspberry smb share from my PC (linux mint).

users on the raspberry: default user "pi" and new user "TF"

"pi" user has write permission, but "TF" does not seem to have it when I mount the shares.

TF was created and added as samba user according to this:

sudo adduser TF
sudo adduser TF sudo
sudo adduser TF users #not sure if relevant
sudo smbpasswd -a TF 

...password also provided, credentials to mount in fstab work well

smb.conf looks like this:

[NASHDD1]
   comment = some comment

   path = /mnt/NASHDD1
   browseable = yes
   read only = no
   public = no
   create mask=0777
   directory mask=0777

ownership of the folders looks like this:

$ ls -l /mnt/
total 4
drwxrwxrwx 9 TF root 4096 Oct 13 17:25 NASHDD1


$ ls -l /mnt/NASHDD1/
total 32
drwxrwxrwx 11 TF root  4096 Sep 10 12:22 asusware.arm
drwxrwxrwx  9 TF root  4096 Sep 13 22:35 Folder1
drwxrwxrwx  2 TF root 16384 Jun  9 07:38 lost+found
drwxrwxrwx  2 TF pi    4096 Oct 13 17:25 Music
drwxrwxrwx 10 TF root  4096 Oct 21 21:54 Folder2

What am I missing?

9
  • Is your mint pc's directory - in which you mount your pi share properly setup (ownership/flags)?
    – Michael D.
    Oct 21, 2017 at 20:33
  • I am mounting it to /mnt/nashdd1; $ ls -l /mnt shows drwxr-xr-x 2 mymintuser root 4096 okt 21 23:32 nashdd1
    – itarill
    Oct 21, 2017 at 21:36
  • can you show how your share is mounted in /etc/fstab?
    – Michael D.
    Oct 21, 2017 at 21:54
  • That would be //raspberryPi2/NASHDD1/ /mnt/nashdd1/ cifs credentials=/home/mymintuser/.smbcredentials 0 0 on the client. Interestingly, when I try to create a file or copy one, it will create an empty one and issue an error message after...
    – itarill
    Oct 21, 2017 at 21:57
  • 1
    Check some examples for Samba shares - there're more options, maybe you're missing the valid users = parameter or so. You could add guest ok = yes to your smb.conf share - just to see if it's a samba setting/option you're missing - good luck
    – Michael D.
    Oct 21, 2017 at 22:50

2 Answers 2

0

Listing valid users in a comma separated list is advisable to enabling writeable guest access with 777 permissions. You may also need wide links enabled depending on how you have the mount point setup.

So, I would first try adding this to your samba share definition:

valid users = pi, TF
create mask = 0600
directory mask = 0700

If that still doesn't work add wide links:

wide links = yes

Hopefully this helps. Good luck!

0

The solution lies in this post (not enough reputation to upvote there yet).

Mounting cifs via fstab mounted the partition as sudo, therefore I did not have W access. Changing the end of the command to ,uid=<user>,gid=<group> 0 0 solved my mysterious problem!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .