SMB not respecting `setgid` flag in POSIX ACLs
Description
Problem/Justification
Impact
Activity
Franz Koch February 3, 2022 at 5:31 PM
and setting the user:group twice is also correct? (once via default POSIX ACL and once via extended ACL)?
And forum didn't help so far with my ACL questions..., so..
William Gryzbowski February 3, 2022 at 12:45 PM
This is the expected behavior of Samba vfs_acl_xattr module.
Appropriate POSIX1E ACLs should be set using UI.
For help we suggest you try the forums.
Thank you
Michelle Johnson February 2, 2022 at 2:16 PM
Thank you for your submission, @Franz Koch!
This issue ticket is now in our queue for review. An engineering representative will update with further details or questions in the hear future.
Franz Koch February 2, 2022 at 1:34 PM
Hi. I don't see how a Debug would help here, but I can ofc provide one. But it won't really differ from the last 2 ones I attached in other tickets config wise
Michelle Johnson February 2, 2022 at 1:15 PM
Thank you for your report, @Franz Koch!
Would you please attach a debug to the Private Attachments area of this issue ticket.
To generate a debug file on TrueNAS SCALE, log in to the TrueNAS web interface, go to System Settings > Advanced, then click Save Debug and wait for the file to download to your local system.
I have just very basic POSIX ACL requirements in that the datasets and related shares only need permissions for one related group each. My users are all members of the groups that are related to the shares they are allowed to see/use. In order for newly created files on those shares to always be accessible to members of the related group, I have set "chmod g+s" (recursively) on the respective share entrypoints (which match datasets).
When files are now created via CLI, the group is applied correctly to new files. But when files get created via SMB on those shares, they end up with the primary group of the SMB user, which IMHO looks like a bug, but I am no expert in this.
Also, files created by SMB users have granted their permissions twice, once as main owner:group and additionally via extended ACLs (user:[username]:xxx etc).
root@brain/mnt/tank/media/recordings# getfacl smb-test.txt
file: smb-test.txt
owner: franz
group: franz
user::rwx
user:franz:rwx
group::r-x
group:franz:r-x
mask::rwx
other::r-x
root@brain/mnt/tank/media/recordings# touch test-cli.txt
root@brain/mnt/tank/media/recordings# getfacl test-cli.txt
file: test-cli.txt
owner: root
group: mediacenter
user::rw-
group::r--
other::r--
I am aware that extended/advanced ACL can be configured via the UI, but basic ACL should work correctly regardlessly.