OS Manuals

/usr/bin/setcifsacl

CIFS filesystem user-space tools

From cifs-utils 7.9-r0 (os), captured 2026-11-05 by running setcifsacl --help (exit 255). permalink

/usr/bin/setcifsacl: invalid option -- '-'
setcifsacl: Alter components of CIFS/NTFS security descriptor of a file object
Usage: setcifsacl option [<list_of_ACEs>|<SID>] <file_name>
Valid options:
	-v	Version of the program
	-U	Used in combination with -a, -D, -M, -S in order to
		apply the actions to SALC (aUdit ACL); if not specified,
		the actions apply to DACL

	-a	Add ACE(s), separated by a comma, to an ACL
	setcifsacl -a "ACL:Administrator:ALLOWED/0x0/FULL" <file_name>

	-A	Add ACE(s) and reorder, separated by a comma, to an ACL
	setcifsacl -A "ACL:Administrator:ALLOWED/0x0/FULL" <file_name>

	-D	Delete ACE(s), separated by a comma, from an ACL
	setcifsacl -D "ACL:Administrator:DENIED/0x0/D" <file_name>

	-M	Modify ACE(s), separated by a comma, in an ACL
	setcifsacl -M "ACL:user1:ALLOWED/0x0/0x1e01ff" <file_name>

	-S	Replace existing ACL with ACE(s), separated by a comma
	setcifsacl -S "ACL:Administrator:ALLOWED/0x0/D" <file_name>

	-o	Set owner using specified SID (name or raw format)
	setcifsacl -o "Administrator" <file_name>

	-g	Set group using specified SID (name or raw format)
	setcifsacl -g "Administrators" <file_name>

Refer to setcifsacl(1) manpage for details
Options (10)
OptionDescriptionSource
-vPrint version number and exit.help + man
-UUsed in combination with -a, -D, -M, -S in order to apply the actions to SALC (aUdit ACL);help + man
-aAdd one or more ACEs to an ACL of a security descriptor.help + man
-AAdd one or more ACEs to the ACL of a security descriptor, while maintaining the preferred order of the ACEs.help + man
-DDelete one or more ACEs from an ACL of a security descriptor.help + man
-MModify one or more ACEs from an ACL of a security descriptor.help + man
-SSet an ACL of security descriptor with the list of ACEs Existing ACL is replaced entirely with the specified ACEs.help + man
-oSet owner SID to one specified as a command line argument.help + man
-gSet group SID to one specified as a command line argument.help + man
-hPrint usage message and exit. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.