XCACLS.exe – Windows CMD Command


Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Display or modify Access Control Lists (ACLs) for files and folders. For Vista and greater use icacls.

FolderSpec is a permission applied to a folder. If FolderSpec is not specified then permission will apply to both files and folders.
This allows you to set different permissions that will apply (through inheritance) when new files are added to the folder.

FolderSpec = ;T@ where @ is one of the rights above, when this is specified new files will inherit FolderSpec instead of permission. At least one folder access right must follow the T For example ;TF will apply full control (but ;FT is not valid)

Wildcards can be used to specify more that one file in a command. You can specify more than one user in a command. You can combine access rights.

Although taking ownership is listed as an option it does not work, use SUBINACL for this.

Inheritance Errors

Permissions incorrectly ordered” – the quickest way to resolve or avoid these errors is to use the newer iCACLS command instead of XCACLS.

Inherited folder permissions are displayed as:

So BUILTIN\Administrators:(OI)(CI)F means that both files and Subdirectories will inherit ‘F’ (Fullcontrol)
similarly (CI)R means Directories will inherit ‘R’ (Read folders only = List permission)

When xcacls is applied to the current folder only there is no inheritance and so no output.

NTFS standards have changed with different versions of Windows and XCACLS has been updated to suit.

Examples:

Allow guests the right to read and execute in MyFolder
XCACLS MyFolder /E /G guests:rx

Allow guests the Full Control permission in MyFolder and all subfolders
XCACLS MyFolder /T /E /G guests:f

Grant guests only read access to all files in and below MyFolder,
new folders created will be Read Access only, new files will not inherit any rights.
XCACLS MyFolder /T /P guests:R;Tr

Grant guests only execute access to all files in and below MyFolder
XCACLS MyFolder /T /P guests:x

You may also like...

1 Response

  1. Jermaine says:

    Your style is really unique in comparison to other
    folks I’ve read stuff from. Thanks for posting when you have the opportunity, Guess I’ll just bookmark this blog.

Leave a Reply

Your email address will not be published. Required fields are marked *