View and change NTFS file permissions on Windows (icacls)
Dump the ACL of any file or folder with icacls, then grant, deny or reset permissions with inheritance control.
01Command
$ icacls "D:\Data"02What it does
The forgotten part is the permission suffix grammar: (OI)(CI) means object-inherit plus container-inherit so new files and folders get the ACE too, and leaving them off is why 'I set the permission but it did not apply' happens. icacls /reset replaces a mangled ACL tree with inherited defaults, the fastest repair after a bad /deny. /save and /restore dump and reload ACLs in SID form, which survives account renames that plain text listings do not.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ICACLS - Windows CMDEvidence: SS64 details icacls syntax for /grant, /deny, /remove and the inheritance rights letters (OI, CI, IO, NP) used in ACE entries.
- icacls | Microsoft LearnEvidence: Microsoft documents icacls for displaying and modifying discretionary access control lists (DACLs), including /grant with inheritance flags like (OI)(CI).
Last verified: 2026-09-17 · Category: Security & Privacy
06Related solutions
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.
Robocopy is Windows' built-in robust file copier: use /MIR to keep a destination folder as an exact one-way mirror of a source, resumable and restartable.
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.