0

I am running Samba on my Raspberry Pi, and have configured the smb.conf file as such, which should just be the default version with the following appended:

[media]
    comment = Media
    path = /mnt/raid1/media
    valid users = @media
    force group = media
    create mask = 0660
    directory mask = 0771
    browseable = yes
    writable = yes
    read only = no
    follow symlinks = yes

However, when I try to connect to this share from macOS, it is invariably read-only. This never used to be a problem, but perhaps an upgrade to either Samba or macOS introduced it? Any advice would be appreciated.

2
  • What's mounted at /mnt/raid1/media? Is it FAT, exFAT or NTFS? If it is then who owns the mount? What umask value did you mount it with? Hint: make the umask=0771.
    – Dougie
    Dec 27 '19 at 3:07
  • @Dougie ext4. root:media owns it. Looks like the issue may have been a weird read-only mount done by the RAID manager (not sure why).
    – Noldorin
    Dec 29 '19 at 5:28
2

If you've upgraded something recently, the issue probably lies in that event... somewhere. It may be a permissions issue? Samba is both straightforward and arcane all at once, and it's difficult to pinpoint what isn't working with the information you've provided. Here's a short checklist of things to try:

  • Does your shared drive have a valid entry in /etc/fstab?
  • What userid have you set as owner of your share? (user pi is easy!)
  • Have you added your userid to Samba's password database file?
  • Are you connecting from your Mac with the correct userid? (e.g. user pi)

It's useful to remember that there are two sets of permissions that apply to your Samba share:

  1. The permissions you set in your smb.conf file, and
  2. The permissions you set up under your host OS (raspbian, I assume)

Both sets of permissions must accommodate the access you desire. If they are different, you will get the most restrictive of the two sets of permissions.

If these generic answers don't resolve your issue, I have two suggestions:

  1. Take a look at this "recipe" for Samba configuration on RPi
  2. Edit your question to reflect additional specifics & we'll look into that
5
  • Thanks for the tips. (Yes, I'm on Raspbian; I probably should have mentioned in the question text as well as tags.) As for your checklist: 1) yes, 2) root:media where media is a group I've created, 3) Yes, a user that is a member of the 'media' group. 4) yes, the same user as in 3.
    – Noldorin
    Dec 27 '19 at 1:06
  • Uff... I just tried to change the ownership of /mnt/raid1 to pi (is that better practice than root?) and it complained about being a read-only filesystem. That's probably the issue.
    – Noldorin
    Dec 27 '19 at 1:22
  • Hmm, my comment got lost, but basically I sorted out the issue with the (software) RAID device only being mounted read-only for some reason, and this got resolved. Thanks for your advice.
    – Noldorin
    Dec 29 '19 at 16:09
  • @Noldorin: Good for you! Was the issue was an incorrect parameter in /etc/fstab?
    – Seamus
    Dec 30 '19 at 2:16
  • Yeah I think so. I fiddled with a few settings and rebooted, but likely that.
    – Noldorin
    Dec 31 '19 at 15:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.