Privacy and Security Enable or Disable Inherited Permissions for File, Folder, or Registry Key in Windows 11

  • Thread starter Thread starter Brink
  • Start date Published: Start date Updated Updated:

Users_header.webp

This tutorial will show you how to enable or disable inherited permissions for files, folders, and registry keys in Windows 10 and Windows 11.

You can set permissions for registry keys, and files and folders on NTFS and ReFS volumes. These permissions allow or deny access to the files, folders, drives, and registry keys.

Every container (ex: folder) and object (ex: file) on the PC has a set of access control information attached to it. Known as a security descriptor, this information controls the type of access allowed to users and groups. The security descriptor is automatically created along with the container or object that is created.

There are two types of permissions: explicit permissions and inherited permissions.
  • Explicit permissions are those that are set by default on non-child objects when the object is created, or by user action on non-child, parent or child objects. Explicit permissions take precedence over inherited permissions. Enabling or disabling inherited permissions for a file or folder will not affect explicit permissions for the file or folder.
  • Inherited permissions are those that are propagated to an object (ex: file or folder) from a parent object (ex: drive or folder). Inherited permissions ease the task of managing permissions and ensure consistency of permissions among all objects within a given container.
By default, objects within a container inherit the permissions from that container when the objects are created. For example, when you create a folder called MyFolder, all subfolders and files created within MyFolder automatically inherit the permissions from that folder. Therefore, MyFolder has explicit permissions, while all subfolders and files within it have inherited permissions.

When you disable inherited permissions for a file or folder (object), you can choose to either Convert inherited permissions into explicit permissions on this object or Remove all inherited permissions from this object.

When you enable inherited permissions for a file or folder (object), all permissions from the object's parent (ex: drive or folder) will get added to the object. You will see Inherited from in the object's Advanced Security Settings to let you know the parent.

References:

You must be signed in as an administrator, current owner, or have "full control" permissions to enable or disable inherited permissions for files, folders, and registry keys.

If you are unable to enable or disable inherited permissions for a file or folder, then you will need to take ownership of the file or folder first, and try again afterwards. This can happen when you are not the owner, or you do not have read or write permissions.


DO NOT disable inherited permissions of Windows system folders like "C:\Windows" or "C:\Program Files\WindowsApps". Doing so will cause issues with Windows that may only be corrected by a clean install, repair install, or restore system image.




Contents

  • Option One: Enable Inherited Permissions for File, Folder, or Registry Key in Advanced Security Settings
  • Option Two: Disable Inherited Permissions for File, Folder, or Registry Key in Advanced Security Settings
  • Option Three: Enable or Disable Inherited Permissions for File or Folder using icacls Command
  • Option Four: Enable or Disable Inherited Permissions for Registry Key using Set-Acl PowerShell Command


EXAMPLE: Explicit and inherited permissions

Explicit_and_inherited_permissions.webp





Option One

Enable Inherited Permissions for File, Folder, or Registry Key in Advanced Security Settings


1 Perform an appropriate action below:
  • Right click on the file or folder you want in File Explorer (Win+E) to enable inherited permissions for, and click/tap on Properties.
  • Right click on a registry key in Registry Editor (regedit.exe) you want to enable inherited permissions for, and click/tap on Permissions.
2 Click/tap on the Security tab, and click/tap on the Advanced button. (see screenshot below)

Enable_inheritable_permissions-1.webp

3 Click/tap on the Change permissions button if there. (see screenshot below)

Enable_inheritable_permissions-2.webp

4 Click/tap on the Enable inheritance button. (see screenshot below)

Enable_inheritable_permissions-3.webp

5 Click/tap on Apply to see the applied inherited permissions. (see screenshot below)

Enable_inheritable_permissions-4.webp

6 Click/tap on OK. (see screenshot below)

If this is for a registry key or folder, you can check Replace all child object permissions entries with inheritable permission entries from this object before clicking on OK to replace the permissions of all subkeys or subfolders and files in this key/folder with the same inherited permissions from this key/folder.

This will also remove explicit permissions from the child objects.


Enable_inheritable_permissions-5.webp

7 Click/tap on OK. (see screenshot below)

Enable_inheritable_permissions-6.webp




Option Two

Disable Inherited Permissions for File, Folder, or Registry Key in Advanced Security Settings


1 Perform an appropriate action below:
  • Right click on the file or folder you want in File Explorer (Win+E) to disable inherited permissions for, and click/tap on Properties.
  • Right click on a registry key in Registry Editor (regedit.exe) you want to disable inherited permissions for, and click/tap on Permissions.
2 Click/tap on the Security tab, and click/tap on the Advanced button. (see screenshot below)

Disable_inheritable_permissions-1.webp

3 Click/tap on the Change permissions button if there. (see screenshot below)

Disable_inheritable_permissions-2.webp

4 Click/tap on the Disable inheritance button. (see screenshot below)

Disable_inheritable_permissions-3.webp

5 Do step 6 (convert inherited permissions) or step 7 (remove inherited permissions) below for what you want.

6 Convert inherited permissions into explicit permissions on this object

A) Click/tap on Convert inherited permissions into explicit permissions on this object. (see screenshot below)​

Disable_inheritable_permissions-4.webp

B) Click/tap on OK, and go to step 8 below. (see screenshot below)​

If this is for a registry key or folder, you can check Replace all child object permissions entries with inheritable permission entries from this object before clicking on OK to replace the permissions of all subkeys or subfolders and files in this key/folder with the same inherited permissions from this key/folder. This will also remove explicit permissions from the child objects.


Disable_inheritable_permissions-5.webp

7 Remove all inherited permissions from this object

This will not remove explicit permissions.


A) Remove all inherited permissions from this object. (see screenshot below)​

Disable_inheritable_permissions-4.webp

B) Click/tap on OK, and go to step 8 below. (see screenshot below)​

If this is for a registry key or folder, you can check Replace all child object permissions entries with inheritable permission entries from this object before clicking on OK to replace the permissions of all subkeys or subfolders and files in this key/folder with the same inherited permissions from this key/folder. This will also remove explicit permissions from the child objects.


Disable_inheritable_permissions-6.webp

8 Click/tap on OK. (see screenshot below)

Disable_inheritable_permissions-7.webp




Option Three

Enable or Disable Inherited Permissions for File or Folder using icacls Command


1 Open Terminal (Admin), and select either Windows PowerShell or Command Prompt.

2 Type the command below you want to use into Terminal, and press Enter. (see screenshots below)

Enable inherited permissions of file or folder​
icacls "<full path of file or folder>" /inheritance:e​

OR​

Disable inherited permissions of file or folder and "Convert inherited permissions into explicit permissions on this object"​
icacls "<full path of file or folder>" /inheritance:d​

OR​

Disable inherited permissions of file or folder and "Remove all inherited permissions from this object"​
icacls "<full path of file or folder>" /inheritance:r​

Substitute <full path of file or folder> in the commands above with the actual full path of the file with extension or folder you want.

For example:

icacls "D:\Folder" /inheritance:e

OR

icacls "D:\Folder\file.txt" /inheritance:e


Inheritance-e.webp

Inheritance-d.webp

Inheritance-r.webp





Option Four

Enable or Disable Inherited Permissions for Registry Key using Set-Acl PowerShell Command



1 Open Terminal (Admin), and select Windows PowerShell.

2 Type the command below you want to use into Terminal, and press Enter. (see screenshot below)

Enable inherited permissions of registry key​
$acl = Get-Acl "<branch>:\<key path>"; $acl.SetAccessRuleProtection($false,$false); Set-Acl "<branch>:\<key path>" $acl​

OR​

Disable inherited permissions of registry key and "Convert inherited permissions into explicit permissions on this object"​
$acl = Get-Acl "<branch>:\<key path>"; $acl.SetAccessRuleProtection($true,$true); Set-Acl "<branch>:\<key path>" $acl​

OR​

Disable inherited permissions of registry key and "Remove all inherited permissions from this object"​
$acl = Get-Acl "<branch>:\<key path>"; $acl.SetAccessRuleProtection($true,$false); Set-Acl "<branch>:\<key path>" $acl​

Substitute <branch> in the commands above with the actual HKCR (HKEY_CLASSES_ROOT), HKCU (HKEY_CURRENT_USER), HKLM (HKEY_LOCAL_MACHINE), HKU (HKEY_USERS), or HKCC (HKEY_CURRENT_CONFIG) branch the key is in.

Substitute <key path> in the commands above with the rest of the path of the registry key.

For example:

$acl = Get-Acl "HKCU:\Control Panel\ExampleKey"; $acl.SetAccessRuleProtection($true,$true); Set-Acl "HKCU:\Control Panel\ExampleKey" $acl


registry_key_inherited_permissions_PowerShell.webp



That's it,
Shawn Brink


 
Last edited:
Tutorial updated to add option 4. :alien:
 

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Here's an important warning: DO NOT disable inheritance for the "\Windows" or "\Program Files\WindowsApps" folders or subfolders.

There are important system permissions defined in very specific ways in order for Windows or UWP (Store) apps to work. Breaking the inheritance can cause weird problems and you will have to restore from a backup, or perform a repair install.

For your personal files, or 3rd-party apps which are not part of Windows, it's fine to change the inheritance.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

Latest Support Threads

Back
Top Bottom