XcAcls Topics | Previous

XcAcls Examples

XCACLS *.* /G administrator:RW /Y

This command replaces the ACL of all files and directories found in the current directory, without scanning any subdirectories and without confirmation.

XCACLS *.* /G TestUser:RWED;RW /E

This command edits the ACL of a file or a directory, but its effect on a directory is different. The ACE added to the directory is also an inherit ACE for new files created in this directory.

In this example, the command gives TestUser read, write, run, and delete rights on all new files created in this directory, but only read and write permissions on the directory itself.

XCACLS *.* /G TestUser:R;TRW /E

This command grants read and write permissions on a directory without creating an inherit entry for new files. Therefore, in this example, new files created in this directory get no ACE for TestUser. For existing files, an ACE with read permissions is created.