Who can explain aclmode = discard, passthrough and restricted with Example?

itet

Dabbler
Joined
Aug 19, 2020
Messages
26
I'm trying to understand the difference between the different aclmode. Good would be also with examples, because I have tried a lot and also read a lot, but still lost.

Some questions:
  1. Does this setting only do some changes when I'm access the share for example with Windows Explorer and create File or Folder?
  2. Every description on web telling something about chmod command. Does this mean only when I'm on TrueNAS console and work with chmod. Or does smb share create file or folder running chmod in the background?
  3. Yes I have seen for Windows should use restricted and NFS passthrough, I want to understand these settings?
  4. An Example would be good to have better understanding of this settings?
  5. If I change this setting for one dataset, when it is active. Do I need to reboot Truenas oder restart SMB service?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
It changes the interaction between chmod and the native ZFS ACL. Chmod is both an tool you can use and a system call that applications may make.
- Discard = strip the ACL whenever chmod happens on file
- Passthrough = adjust the ACL to match the desired mode
- Restricted = reject the chmod call if a non-trivial ACL is on file.

It only makes sense in context of the combination of acltype and aclmode
If acltype is POSIX -- _always_ use discard. This is because in this case the internal ZFS ACL is disabled in favor of a POSIX ACL blob stored as an xattr in ZFS.
If acltype is NFSv4 -- either use passthrough or restricted.
 

itet

Dabbler
Joined
Aug 19, 2020
Messages
26
Thanks @anodos
Maybe stupid question but if I access to SMB Share with Windows PC, does there happen a chmod? If happen what situation. Maybe you have some explanations or links to read?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Thanks @anodos
Maybe stupid question but if I access to SMB Share with Windows PC, does there happen a chmod? If happen what situation. Maybe you have some explanations or links to read?
Depending on situation SMB server may fchmod file on creation. Other applications may also chmod or mkdir whilst specifying mode to set. You can look at samba source for calls to SMB_VFS_FCHMOD if you are morbidly curious.
 
Top