How To

How to Fix Failed to Enumerate Objects in the Container (Access is denied)

By Geethu 4 min read
error

This Windows error usually pops up when you try to change permissions or ownership on a file or folder. In short, Windows can’t read or update the permission list, so it refuses the change.

Good news: you can fix it. Start with the quick checks, then move through the steps until the problem is gone.

Before you start

  • Use an account with Administrator rights.
  • If the folder is on an external drive or network share, make sure it’s connected and writable.
  • If you see this on a recently moved/copied folder, Windows might need fresh ownership/permissions.

Quick fixes (try first)

  1. Restart the PC
    A simple reboot sometimes clears permission locks.
  2. Try Safe Mode (optional but helpful)
    Safe Mode loads only the essentials and avoids third-party interference.
    Settings → System → Recovery → Advanced startup → Restart now → Troubleshoot → Advanced options → Startup Settings → Restart → press 4 (Safe Mode).

Method 1: Take ownership and reset permissions (Graphical way)

  1. Right-click the folder/file → PropertiesSecurity tab → Advanced.
  2. At the top, click Change (next to Owner).
  3. Type your user name, click Check Names, then OK.
  4. Tick:
    • Replace owner on subcontainers and objects
    • Replace all child object permission entries with inheritable permission entries from this object
  5. Click Apply, then reopen Advanced (same window).
  6. Click AddSelect a principal → type Everyone (or your user) → Check NamesOK.
  7. Under Basic permissions, choose Full controlOKApply.

Try your action again.

Method 2: Command line reset (fast and reliable)

Run Command Prompt as Administrator and replace the path with your real folder path.
takeown /F "C:\\Path\\To\\Folder" /R /D Y
icacls "C:\\Path\\To\\Folder" /grant Administrators:F /T

What this does:

  • takeown makes Administrators the owner (recursively).
  • icacls grants full control to the Administrators group (recursively).

If you prefer granting your specific user instead of Administrators:
icacls "C:\\Path\\To\\Folder" /grant YourUserName:F /T

Method 3: Temporarily lower UAC (then turn it back on)

Sometimes User Account Control blocks permission changes.

  1. Open Control PanelUser AccountsChange User Account Control settings.
  2. Move the slider to Never notifyOKRestart.
  3. Repeat Method 1 or Method 2.
  4. Important: move the slider back to a safer level afterward.

Method 4: Use the built-in Administrator (when your account is restricted)

Enable the hidden admin account, do the fix, then disable it again.

Open Command Prompt (Admin) and run:
net user administrator /active:yes

  • Sign out, sign in as Administrator, fix the folder (Method 1 or 2).
  • When done, disable the account:

net user administrator /active:no

Method 5: Repair file system and Windows components

Corruption on disk or system files can break permissions.

1. CHKDSK (disk check)

chkdsk C: /f /r /x

  • Replace C: with the drive letter that holds the problem folder.
  • It may schedule a scan for the next restart—accept it and reboot.

2. SFC (System File Checker)

sfc /scannow

3. DISM (Windows image repair)

DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth

After these, try Method 1 or 2 again.

Method 6: Clean boot (find software conflicts)

  1. Press Win + R, type msconfig, press Enter.
  2. Services tab → tick Hide all Microsoft servicesDisable all.
  3. Startup tab → Open Task ManagerDisable all startup items.
  4. OKRestart.
  5. Try the permission change.
    If it works here, re-enable items one by one to find the culprit.

Extra tips

  • Network or external drives: ensure you have Modify rights on the share and NTFS level. On NAS devices, match user names/permissions on the NAS too.
  • Inherited vs explicit permissions: if inheritance is broken on child folders, re-enable inheritance from Advanced security settings, or reset permissions with icacls as shown.
  • Avoid mixing owners: keep a consistent Owner (usually your user or Administrators) across a folder tree.
  • Restore point: if you’re about to change a lot of permissions, create a System Restore Point first.
  • Malware check: rare, but malware can alter ACLs. Run a quick scan if things keep breaking.

Quick checklist (what usually fixes it)

  • ✅ Run CMD as Admin and do:

takeown /F "C:\\Path\\To\\Folder" /R /D Y
icacls "C:\\Path\\To\\Folder" /grant Administrators:F /T

  • ✅ If it still fails: lower UAC → repeat → raise UAC back.
  • ✅ If it still fails: Safe Mode → repeat.
  • ✅ If it still fails: CHKDSK, SFC, DISM → repeat.
  • ✅ If it only works in Clean Boot, a third-party app or security tool is blocking it—adjust or uninstall that tool.

When to stop and ask for help

  • You see repeated Access is denied even for Administrator and built-in Administrator.
  • The folder lives on a corporate domain or server with group policies—you may not have rights to change it.
  • The drive shows signs of failing (clicks, vanishing files). Back up first.
Geethu

Geethu is an educator with a passion for exploring the ever-evolving world of technology, artificial intelligence, and IT. In her free time, she delves into research and writes insightful articles, breaking down complex topics into simple, engaging, and informative content. Through her work, she aims to share her knowledge and empower readers with a deeper understanding of the latest trends and innovations.

Leave a Comment

Your email address will not be published. Required fields are marked *