Lỗi failed to enumerate objects in this container access denied năm 2024

The "Failed to enumerate objects in the container" Windows error arises when performing certain actions like accessing files, folders, or a drive on your PC. It can also appear when attempting to modify their permissions. Although the cause may vary, ranging from insufficient admin privileges to corrupted system files, resolving the error isn’t too difficult.

1. Switch to an Administrator Account

A common reason why you may have trouble changing permissions for a file, folder, or drive is if you are not using an admin account. To avoid this, make sure your Windows account has administrative privileges.

If you are using a standard account, switch to an administrator account and try again. Alternatively, you can change a user account type from standard to administrator via the Settings app or Control Panel—though you'll of course need to use an admin account to do this.

2. Take Ownership of a File or Folder Using the Command Prompt

At times, Windows may display the "Failed to enumerate objects in the container" error message even when you're using an admin account to take ownership of a file, folder, or drive. In such instances, you can try using the Command Prompt to get ownership of the specific file or folder you desire.

To do this, you will first need to copy the full path of the file or folder in question. Here are the steps:

  1. Press Win + E to open File Explorer.
  2. Locate the file or folder in question, right-click on it, and select Copy as Path from the context menu.
  3. Press Win + S to access the search menu.
  4. Type Command Prompt in the text box and select Run as administrator.
  5. Select Yes when the User Account Control (UAC) prompt appears.
  6. Type the following command in the console, replacing FilePath with the file or folder path you copied earlier, and press Enter:
        takeown /F FilePath /r /d y  
      
    
    Lỗi failed to enumerate objects in this container access denied năm 2024

Once you complete the above steps, you should be able to access and modify the file or folder without any errors.

3. Temporarily Disable UAC

Another step you can take to fix the “Failed to enumerate objects in the container” error is to disable User Account Control (UAC) temporarily on your Windows computer. To do so, use these steps:

  1. Click the search icon on the taskbar or hit the Windows key to open the search box.
  2. Type change user account control settings in the search box and press Enter.
  3. Drag the slider all the way down to Never notify and click OK.
  4. Select Yes if the User Account Control (UAC) prompt appears.
    Lỗi failed to enumerate objects in this container access denied năm 2024

Try accessing or modifying your file, folder, or drive and see if the error still appears. Remember that UAC is a security feature that helps protect your system from unauthorized changes, so it's important to re-enable this right after making the desired changes.

4. Run CHKDSK, SFC, and DISM Scans

Errors like “Failed to enumerate objects in the container” can also arise due to issues with the file system and core system files. Fortunately, Windows includes a few tools that can help you repair such issues with ease. In this case, you should run the CHKDSK (Check Disk), SFC (System File Checker), and DISM (Deployment Image Service and Management Tool) scans using the following steps:

  1. Press Win + S to access the search menu.
  2. Type Command Prompt in the text box and select Run as administrator.
  3. Type the following command, replacing c: with the drive letter where the file or folder is located, and press Enter.
        chkdsk c: /f /r
  4. Wait for the chkdsk scan to complete.
  5. Now, type the following command and hit Enter to run the DISM scan. DISM /Online /Cleanup-Image /RestoreHealth
    Lỗi failed to enumerate objects in this container access denied năm 2024
  6. Once complete, type the following command and press Enter to run the SFC scan.
        sfc /scannow

Wait for the scans to complete, then restart your PC. Following that, you shouldn't encounter further errors.

5. Try Safe Mode

If nothing else works, you can consider booting your Windows PC into safe mode, which will load the system with a minimal set of programs and drivers. Doing so allows you to access and modify the permissions of a file or folder without any interference from third-party apps and services, helping you avoid "Access Denied" errors on Windows.

Refer to our guide on booting your Windows PC in Safe Mode, then run through the steps to take ownership of the file or folder one more time. If all else has failed, this more advanced step should help you resolve this error.