So sánh sự khác nhau giữa icacls với cacls

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

cacls

  • Article
  • 02/03/2023

In this article

Important

This command has been deprecated. Please use icacls instead.

Displays or modifies discretionary access control lists (DACL) on specified files.

Syntax

cacls  [/t] [/m] [/l] [/s[:sddl]] [/e] [/c] [/g user:] [/r user [...]] [/p user: [...]] [/d user [...]]

Parameters

Parameter Description`Required. Displays ACLs of specified files. /t Changes ACLs of specified files in the current directory and all subdirectories. /m Changes ACLs of volumes mounted to a directory. /l Works on the Symbolic Link itself instead of the target. /s:sddl Replaces the ACLs with those specified in the SDDL string. This parameter is not valid for use with the /e, /g, /r, /p, or /d parameters. /e Edit an ACL instead of replacing it. /c Continue after access denied errors./g user:`Grants specified user access rights, including these valid values for permission:

  • n - None
  • r - Read
  • w - Write
  • c - Change (write)
  • f - Full control /r user [...] Revoke specified user's access rights. Only valid when used with the /e parameter.`[/p user: [...]`Replace specified user's access rights, including these valid values for permission:
  • n - None
  • r - Read
  • w - Write
  • c - Change (write)
  • f - Full control [/d user [...] Deny specified user access. /? Displays help at the command prompt.

Sample output

Output Access control entry (ACE) applies to OI Object inherit. This folder and files. CI Container inherit. This folder and subfolders. IO Inherit only. The ACE does not apply to the current file/directory. No output message This folder only. (OI)(CI) This folder, subfolders, and files. (OI)(CI)(IO) Subfolders and files only. (CI)(IO) Subfolders only. (OI)(IO) Files only.

Remarks

  • You can use wildcards (? and *) to specify multiple files.
  • You can specify more than one user.
  • Command-Line Syntax Key
  • icacls

Feedback

Submit and view feedback for


Additional resources

Additional resources

In this article

In Microsoft Windows, cacls and its replacement, icacls, native command-line utilities capable of displaying and modifying the security descriptors on folders and files. An access-control list is a list of permissions for securable object, such as a file or folder, that controls who can access it. The cacls command is also available on ReactOS.

cacls[edit]

cacls

So sánh sự khác nhau giữa icacls với cacls

The ReactOS cacls command

Developer(s)Microsoft, Thomas WeidenmuellerInitial release1994, 28–29 years agoOperating systemMicrosoft Windows, ReactOSCommandLicenseWindows: Proprietary commercial software ReactOS: GNU Lesser General Public LicenseWebsitedocs.microsoft.com/en-us/windows-server/administration/windows-commands/cacls

So sánh sự khác nhau giữa icacls với cacls

This section needs expansion with: general description, examples and additional citations. You can help by adding to it. (September 2009)

The cacls.exe utility is a deprecated command line editor of directory and file security descriptors in Windows NT 3.5 and later operating systems of the Windows NT family. Microsoft has produced the following newer utilities, some also subsequently deprecated, that offer enhancements to support changes introduced with version 3.0 of the NTFS filesystem:

  • xcacls.exe is supported by Windows 2000 and later and adds new features like setting Execute, Delete and Take Ownership permissions
  • xcacls.vbs
  • fileacl.exe
  • icacls.exe (included in Windows Server 2003 SP2 and later)
  • SubInAcl.exe - Resource Kit utility to set and replace permissions on various type of objects including files, services and registry keys
  • Windows PowerShell (Get-Acl and Set-Acl cmdlets)

The ReactOS version was developed by Thomas Weidenmueller and is licensed under the GNU Lesser General Public License.