0

I'm having difficulty understanding file/directory permissions especially with Samba.

On my server (Debian 11, Samba 4.13.13), I've created several different users and added them to samba (ie. smbpasswd) and I'm trying to share several ZFS shares (ie. zfs set sharesmb=on pool/zfs).

Everything works but if user1 creates a file then user2 cannot modify it or delete it.

EDIT: The shares were created automatically using "zfs set sharesmb=on pool/zfs" and not defined in /etc/samba/smb.conf.

Here is the output of "net usershare info" for one share:

[tank_downloads]
path=/tank/downloads
comment=Comment: /tank/downloads
usershare_acl=Everyone:F,
guest_ok=n

What are some solutions? I don't want to use "force user" (smbd.conf) because I'd like to see which user actually performed the changes.

3
  • Show us how is your share defined in smb.conf`.
    – harrymc
    Mar 23, 2022 at 14:01
  • I've added more information above. Thanks!
    – SofaKng
    Mar 23, 2022 at 14:27
  • I usually put the users in a group, set the share root dir and contents as owned by that group, and set SetGID on the dir and its contents, and give the group full permissions. that way the users are being evaluated for permissions based on the Group permission instead of Owner or Other. I see you are using ACLs so that may change some aspects of it, but its worked well for me. also remember that share permissions stack atop disk permissions, so the user needs permission granted to both the share and the directory. Mar 23, 2022 at 17:36

0

You must log in to answer this question.

Browse other questions tagged .