Linux general permissions generally do not meet the shared needs, such as NFS and samba.
Especially samba is the most obvious.
With an ACL, mom doesn't have to worry about file permissions anymore.
ACL permissions are set to two commands: Setfacl set permissions, Getfacl get ACL permission information for the file.
Simple is an example:
The ACL is set in a directory where umask is 022 and the user of that directory is root.
To use an ACL, the mounted partition must have the ACL attribute added:
Mount-o Remount,acl/dev/sdb1/sharedir
Mount-l | grep Sharedir
Edit File/etc/fstab
/dev/sdb1/sharedir ext4 Rw,acl 0 0
Setfacl-m G:group_name:rwx/sharedir Set the group to have ACL permissions on the Sharedir directory, subdirectories do not have
Setfacl-m D:u:use_name:rwx/sharedir Set the user to have ACL permissions on the Sharedir directory and all subdirectories
Depending on the reasoning you get a set of settings:
Setfacl-m U:user_name:rwx/sharedir
Setfacl-m D:g:group_name:rwx/sharedir
Setfacl-k/sharedir
Setfacl-b/sharedir
Setfacl-x U:user_name/sharedir
Use please help for specific usage
ACL for Linux