Viewing
getcifsacl <file_name>
The ACLs (Access Control Lists) are structured as
ACL:SID:Type/Flags/Mask
-
SID
Identifies the user or group to which the permission applies. -
Type
- ALLOWED
- DENIED
- OBJECT_ALLOWED
- OBJECT_DENIED
-
Flags
- OBJECT_INHERIT_FLAG (OI)
- CONTAINER_INHERIT_FLAG (CI)
- NO_PROPAGATE_INHERIT_FLAG (NI)
- INHERIT_ONLY_FLAG (IO)
- INHERITED_ACE_FLAG (IA)
-
Mask
- FULL (view, list, execute, modify, add, delete, modify permissions)
- CHANGE (view, list, execute, modify, add, delete)
- READ (view, list, execute)
- Combination of R W X D P O
Permissions are applied in parallel, i.e. a user receives permissions from all ACLs, with DENIED permission taking precedence over ALLOWED. It is generally recommended to set permissions using ALLOWED rather than DENIED.
Setting
setcifsacl -M "ACL:ROBARTS\CFMM_SG:ALLOWED/OI|CI|I/READ" <file_name>
Will modify the ACL for ROBARTS\CFMM_SG:ALLOWED
to be the new settings of READ only, which will be inherited by all new files within the directory <file_name>
. You can also use -a
to add a new ACL and -D
to delete an existing ACL.
man setcifsacl
will provide addition information on the command.
To avoid rendering your data inaccessible.
- Do not use of
-S
which sets the list of ACLs, deleting all existing ACLs. - Do not modify ACLs for
- ACL:BUILTIN\Administrators
- ACL:NT Authority\SYSTEM
- ACL:ROBARTS<username>
- ACL:\Creator Owner
- ACL:ROBARTS\IT_Centre_SG
- ACL:ROBARTS\CFMM_Admin_SG
View Group memberships
- To view your own group membership
id
- To view members of a group
getent group <groupnam>