Why This Error Happens
Error 1340 occurs when Windows cannot correctly propagate inherited permissions from a parent folder or registry key down to its child objects. This is typically caused by a broken permission inheritance chain, a corrupted Security Descriptor in the file system or registry, or insufficient administrative privileges to read/write the ACL metadata. It frequently surfaces during software installations, Windows Updates, or when running icacls/takeown operations on system-protected folders.
Step-by-Step Resolution Guide
Step 1: Run the Operation with Elevated Administrator Rights
- Right-click Command Prompt or PowerShell and select “Run as administrator.”
- Standard user tokens, even in an Admin group, often lack the
SeRestorePrivilegeneeded to rebuild inherited ACEs — elevation resolves this in most cases. - Re-attempt the failing installer or command after elevation.
Step 2: Reset Inherited Permissions on the Target Object
- Open Command Prompt (Admin) and navigate to the parent directory of the problematic folder/file.
- Run:
icacls "C:\Path\To\Folder" /reset /T /C - The
/Tflag applies recursively to all subfolders/files;/Ccontinues past any individual object errors instead of halting. - If the error involves a registry key, use
regedit, right-click the key → Permissions → Advanced → check “Replace all child object permission entries with inheritable permissions from this object.”
Step 3: Take Ownership of the Affected Object
- If resetting permissions alone doesn’t work, ownership may be locked to a deleted SID or a different user profile.
- Run:
takeown /F "C:\Path\To\Folder" /R /D Y - Follow immediately with:
icacls "C:\Path\To\Folder" /grant Administrators:F /T - This forces ownership to the local Administrators group before re-applying inheritance.
Step 4: Run SFC and DISM to Rule Out System File Corruption
- Corrupted system files can prevent the Security Reference Monitor from writing new ACEs correctly.
- Run:
sfc /scannow - Follow with:
DISM /Online /Cleanup-Image /RestoreHealth - Restart Windows 11 after both scans complete, then retry the original action that triggered Error 1340.
Step 5: Check for Third-Party Antivirus or Group Policy Interference
- Some antivirus software or restrictive Group Policy Objects (GPOs) intercept ACL write operations, causing them to silently fail.
- Temporarily disable third-party AV real-time protection and retry.
- Check
gpedit.mscunder Computer Configuration > Windows Settings > Security Settings > File System for any conflicting policies that override permission inheritance.
Alternative or Verification Steps
- Verify the fix: Re-run
icacls "C:\Path\To\Folder"(without modifiers) to confirm the ACL entries now display “(I)” flags, indicating inheritance was successfully restored. - Alternative solution: If the object remains corrupted, boot into Safe Mode, take ownership from there (bypassing locked file handles), or restore the specific file/folder from a File History/System Restore backup point predating the corruption.