Samba share writable to everyone, even if someone else created the files? - eviltoast

I have a public SMB share mainly as a media dump. Everyone can read and write, without any auth - as intended. However, if I copy files via SSH (as a regular user, not the samba user), these files are of course owned by that user and thus not writable for the samba user - so I can’t touch these files via SMB.

My config looks like this

[public]
  path = /path/to/samba/public
  guest ok = yes
  writeable = yes
  browseable = yes
  create mask = 0664
  directory mask = 0775
  force user = sambapub
  force group = users

I can fix the permissions by simply chown/chmod all files, but that’s not really a solution.

      • AggressivelyPassive@feddit.deOP
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        The user is in that group, but files are (by default) owned by the user (that is, the group of the same name as the user, I’m not sure, what the wording is).

        However, at least it seems to currently work somewhat. I had to chown and umask the entire share, and then restart the machine. Maybe some dangling session interfered?