0% found this document useful (0 votes)
417 views4 pages

Icacls

The icacls command displays or modifies access control lists (ACLs) on files and directories in Windows. It allows granting, denying, removing, and restoring permissions for specific users or groups. Permissions can be specified using simple rights like R or F, or specific rights like D or WDAC. The command supports operations on individual files, directories, and restoring ACLs from files.

Uploaded by

fenix6232
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
417 views4 pages

Icacls

The icacls command displays or modifies access control lists (ACLs) on files and directories in Windows. It allows granting, denying, removing, and restoring permissions for specific users or groups. Permissions can be specified using simple rights like R or F, or specific rights like D or WDAC. The command supports operations on individual files, directories, and restoring ACLs from files.

Uploaded by

fenix6232
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Icacls

50 out of 87 rated this helpful - Rate this topic Updated: April 17, 2012 Applies To: Windows Server 2008 Displays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories. For examples of how to use this command, see Examples.

Syntax
icacls <FileName> [/grant[:r] <Sid>:<Perm>[...]] [/deny <Sid>:<Perm>[...]] [/rem ove[:g|:d]] <Sid>[...]] [/t] [/c] [/l] [/q] [/setintegritylevel <Level>:<Policy> [...]] icacls <Directory> [/substitute <SidOld> <SidNew> [...]] [/restore <ACLfile> [/c] [/l] [/q]]

Parameters

Parameter
<FileName> <Directory> /t /c /l /q [/save <ACLfile> [/t] [/c] [/l] [/q]] [/setowner <Username> [/t] [/c] [/l] [/q]] [/findSID <Sid> [/t] [/c] [/l] [/q]]

Description
Specifies the file for which to display DACLs. Specifies the directory for which to display DACLs.

Performs the operation on all specified files in the current director

Continues the operation despite any file errors. Error messages wil Performs the operation on a symbolic link versus its destination. Suppresses success messages.

Stores DACLs for all matching files into ACLfile for later use with Changes the owner of all matching files to the specified user.

Finds all matching files that contain a DACL explicitly mentioning

identifier (SID). [/verify [/t] [/c] [/l] [/q]]

Finds all files with ACLs that are not canonical or have lengths inc control entry) counts.

[/reset [/t] [/c] [/l] [/q]] [/grant[:r] <Sid>:<Perm>[...]]

Replaces ACLs with default inherited ACLs for all matching files.

Grants specified user access rights. Permissions replace previously permissions.

Without :r, permissions are added to any previously granted explic [/deny <Sid>:<Perm>[...]]

Explicitly denies specified user access rights. An explicit deny AC permissions and the same permissions in any explicit grant are rem Removes all occurrences of the specified SID from the DACL. :g removes all occurrences of granted rights to the specified SID. :d removes all occurrences of denied rights to the specified SID.

[/remove[:g|:d]] <Sid>[...]] [/t] [/c] [/l] [/q]

[/setintegritylevel [(CI)(OI)]<Level>:<Policy>[...]]

Explicitly adds an integrity ACE to all matching files. Level is spe


L[ow] M[edium] H[igh]

Inheritance options for the integrity ACE may precede the level an directories. [/substitute <SidOld> <SidNew> [...]]

Replaces an existing SID (SidOld) with a new SID (SidNew). Requ the Directory parameter.

/restore <ACLfile> [/c] [/l] [/q]


Remarks

Applies stored DACLs from ACLfile to files in the specified direct the Directory parameter.

SIDs may be in either numerical or friendly name form. If you use a numerical form, affix the wildcard character * to the beginning of the SID. icacls preserves the canonical order of ACE entries as: Explicit denials Explicit grants

Inherited denials Inherited grants

Perm is a permission mask that can be specified in one of the following forms: A sequence of simple rights: F (full access) M (modify access) RX (read and execute access) R (read-only access) W (write-only access) A comma-separated list in parenthesis of specific rights: D (delete) RC (read control) WDAC (write DAC) WO (write owner) S (synchronize) AS (access system security) MA (maximum allowed) GR (generic read) GW (generic write) GE (generic execute) GA (generic all) RD (read data/list directory) WD (write data/add file) AD (append data/add subdirectory) REA (read extended attributes)

WEA (write extended attributes) X (execute/traverse) DC (delete child) RA (read attributes) WA (write attributes) Inheritance rights may precede either Perm form, and they are applied only to directories: (OI): object inherit (CI): container inherit (IO): inherit only (NP): do not propagate inherit

Examples
To save the DACLs for all files in the C:\Windows directory and its subdirectories to the ACLFile file, type: icacls c:\windows\* /save aclfile /t To restore the DACLs for every file within ACLFile that exists in the C:\Windows directory and its subdirectories, type: icacls c:\windows\ /restore aclfile To grant the user User1 Delete and Write DAC permissions to a file named "Test1", type: icacls test1 /grant User1:(d,wdac) To grant the user defined by SID S-1-1-0 Delete and Write DAC permissions to a file, named "Test2", type: icacls test2 /grant *S-1-1-0:(d,wdac)

Additional references
Command-Line Syntax Key

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy