File permissions problem, can't set recursively

Having problems with file permissions. If user apps creates a file in a directory, it gets permissions -rw-r–r–. When a “human user” connecting through SMB creates a file, it gets permissions -rw-rw-r–.

Further, I thought the new file would inherit the creator’s primary group, but instead it gets the directory’s group. There’s no setgid on the directory that I can see.

I’ve tried to set the whole dataset permissions recursively, where everyone (user, group and other) has all permissions checked, but nothing changes on these files. Well, the user and group get updated if they were something else, but the permissions don’t. Also this wouldn’t solve the problem that every new file Syncthing (user apps) creates lacks the proper permissions so the SMB user can’t edit the files, but obviously there’s something I just don’t understand about how permissions work.

setgid equivalent is because you have the dataset acltype set to NFSV4. Remaining behavior is because you haven’t set the ZFS aclmode to restricted so the SMB create mask is being used. Generally it’s better to properly set ACLs to grant the relevant groups permissions and not rely on UGO.

Thanks, somehow I thought the “UGO” permissions would be the easiest way to just give everyone full access, but apparently ACL is the way to go.