Windows Server 2003 in a Nutshell

cacls

Displays or modifies access control lists (ACLs) of files and directories on NTFS volumes .

Syntax

cacls filename [/t] [/e] [/c] [/g username : perm ] [/r username [...] ] [/p username : perm [...] ] [/d username [...] ]

Options

filename [filename...]

Displays ACLs of specified file(s)

/t

Recursively applies changes to ACLs of specified files, starting from the current directory and extending to all subdirectories

/e

Merges changes into an ACL instead of overwriting it

/c

Ignores errors during the process of modifying an ACL

/g username:perm

Grants username one of the following permissions:

N

None

R

Read

C

Change (Write)

F

Full Control

/r username

Revokes all permissions for username

/p username:perm

Replaces one of the following permissions for username :

N

None

R

Read

C

Change (Write)

F

Full Control

/d username

Explicitly denies access to username

Examples

Display the ACL for the directory C:\WINDOWS :

cacls C:\WINDOWS C:\WINDOWS NT AUTHORITY\Authenticated Users:R NT AUTHORITY\Authenticated Users: (OI)(CI)(IO)(special access:) GENERIC_READ GENERIC_EXECUTE BUILTIN\Server Operators:C BUILTIN\Server Operators:(OI)(CI)(IO)C BUILTIN\Administrators:F BUILTIN\Administrators:(OI)(CI)(IO)F NT AUTHORITY\SYSTEM:F NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F BUILTIN\Administrators:F CREATOR OWNER:(OI)(CI)(IO)F

Table 5-1 explains the various symbols used in the output of cacls .

Table 5-1. Symbols used in cacls command

Symbol

Description

C

Container (directory)

O

Object (file)

I

Inherit (taking on the permissions of the parent directory)

OI

Object inherit (any files created in this directory inherit this ACL)

CI

Container inherit (any subdirectories created in this directory inherit this ACL)

IO

Inherit only (ACL doesn't apply to the directory, only to subdirectories)

Notes

See Also

Permissions

Категории