The cacls command in Windows

Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.

The cacls command displays or modifies an arbitrary access control list (DACL) on the specified file.

The cacls command in Windows

  1. Syntax
  2. Parameters
  3. Note

Syntax

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

Parameters

ParameterDescription Required. Display Acls of specified files. / t Change the specified Acls in the current directory and all subdirectories. / m Change the Acls of the mounted drive to a folder. / l Working with Symbolic Link, not the target. / s: sddl replaces Acls with the ones specified in the SDDL string (invalid with / e , / g , / r , / p , or / d ). / e Edit ACL instead of replacing it. / c Continue to deny access error. / g user: Grant access to the specified user. Valid values ​​for permissions:

- n - none: No
- r - read: Read
- w - write: Write
- c - change (write): Change write permissions
- f - full control: Full control / r user [.] Revoke access of the specified user (only valid for / e ). [/ p user: [.] Replace the access of specific users.
Valid values ​​for permissions:

- n - none: No
- r - read: Read
- w - write: Write
- c - change (write): Change write permissions
- f - full control: Full control [/ d user [.] Denies access to specified users. /? Show help at the command prompt.

Note

  1. If this command has not been accepted, please use icacls instead.
  2. Use the following table to interpret the results:
Output ( Access ) The access control entry (ACE) applies to OI (Short for Object inherit) / Folders and these files. CI (Short for Container inherit) / This directory and subdirectory. IO (Inherit only) / ACE does not apply to the current file / directory | No output message | Only this directory. OI) (CI) This directory, subdirectory and file. (OI) (CI) (IO) Only subdirectories and files. (CI) (IO) Only subfolder (OI) (IO) File only.
  1. You can use wildcards (? And *) to specify multiple files.
  2. You can specify multiple users.

See more:

  1. The command bitadmin addfilewithranges in Windows
  2. Bitsadmin create command in Windows
  3. Bitsadmin complete command in Windows
4 ★ | 1 Vote

May be interested

  • Instructions for using Command PromptInstructions for using Command Prompt
    deep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
  • Rd command in WindowsRd command in Windows
    the rd command helps delete a directory
  • Cmd command in WindowsCmd command in Windows
    the cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
  • How to use the command history function in Command PromptHow to use the command history function in Command Prompt
    command prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
  • The sfc command in WindowsThe sfc command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Reg command copy in WindowsReg command copy in Windows
    to copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
  • Fc command in WindowsFc command in Windows
    the fc command compares two files or a collection of files and displays the differences between them.
  • The echo command in WindowsThe echo command in Windows
    the echo command displays the message or turns on / off the command repeat feature. if used without parameters, the echo command will display the current echo setting.
  • Xcopy command in WindowsXcopy command in Windows
    the xcopy command is a command prompt command used to copy one or more files or folders from one location to another. with many options and the ability to copy entire directories, the xcopy command is similar to, but much more powerful, than the copy command.
  • Clean command in WindowsClean command in Windows
    the clean command deletes all partitions or formats the volume from the current drive. the command applies to windows server (semi-annual channel), windows server 2019, windows server 2016, windows server 2012 r2, windows server 2012.