Windows Tools

XcAcls Syntax

Overview | Syntax | Examples | Related Tools Open Command Prompt

XcAcls uses the following syntax:

One Step xcacls FileName [/t] [/e] [/c] [/g User:Permissions;Spec] [/r User] [/p User:Permissions;Spec] [...]] [/d User [...]] [/y] [/?|/h]

Parameters

FileName
Indicates the name of the file or directory to which the access control list (ACL) or access control entry (ACE) is typically applied. All standard wildcard characters can be used.
/t
Recursively walks through the current directory and all of its subdirectories, applying the chosen access rights to the matching files or directories.
/e
Edits the ACL instead of replacing it.
/c
Causes XcAcls to continue if an "access denied" error occurs. If /c is omitted, XcAcls stops on this error.
/g User:Permissions;Spec
Grants User access to the matching file or directory. Permissions apply the specified access right to files. Spec can be the same as Permissions and only applies to a directory. In this case, Permissions is used for file inheritance in this directory. Permissions and Spec accept the following values:
Value Description
R Read
C Change (write)
F Full Control
P Change Permissions (special access)
O Take Ownership (special access)
X Execute (special access)
E Read (Special access)
W Write (Special access)
D Delete (Special access)
T Used only by Spec. ACE not specified. Sets an ACE for the directory itself without specifying an ACE that is applied to new files created in that directory. At least one access right must follow. Spec entries that precede T (in other words, those between the semicolon and the T) are ignored. (Special value)

Notes

/r User
Revokes all access rights for the specified user.
/p User:Permissions;Spec
Replaces access rights for User. Permissions apply the specified access right to files. Spec can be the same as Permissions and only applies to a directory. In this case, Permissions is used for file inheritance in this directory. Permissions and Spec accept the following values:
Value Description
R Read
C Change (write)
F Full Control
P Change Permissions (special access)
O Take Ownership (special access)
X Execute (special access)
E Read (Special access)
W Write (Special access)
D Delete (Special access)
T Used only by Spec. ACE not specified. Sets an ACE for the directory itself without specifying an ACE that is applied to new files created in that directory. At least one access right must follow. Spec entries that precede T (in other words, those between the semicolon and the T) are ignored. (Special value)

Notes

/d User
Denies the specified user access to the file or directory.
/y
Disables the confirmation when replacing user access rights. By default, XcAcls asks for confirmation. Because of this feature, when XcAcls is used in a batch routine, the routine stops responding until the right answer is entered. Use the /y parameter when you use XcAcls in batch mode.