Dec 25, 2024 • Filed to: Windows Computer Solutions • Proven solutions
Windows 10 has the option to secure folders that hold important files so as not to be deleted or lost easily. Folders or files can be shared with multiple users sharing a local network. This access can be changed by the Administrator, but there are cases when the admin fails to modify access permission for users or other user groups, showing the "Failed to Enumerate Objects in the Container. Access is denied" error.
In Windows 10, the folder permissions enable one to keep any content saved in a folder either public or private. This is a useful function for when you have important and sensitive files that should not be accessed by anyone but you. However, when you try to change permissions for a certain folder, there are instances when the error shows up.
The common cause of this particular error is that you do not have permission to change anything in the folder because the ownership is of some other account. If you do not have Administrator control, you will not be able to change anything on the folder or file. Another reason is that there are some incorrect settings on the folder that are configured without your permission.
There are certain steps you need to follow to resolve the issue. These are simple and easy to do because they entail just a few changes in Windows settings. Here are some of them.
Note: Before trying anything, make sure that you have created a restore point. Attempting to fix this error involves changing system settings, which may cause system files or folders to crash or misbehave.
This method is by far the solution suggested by Windows and Microsoft experts. Other users have also said that this resolves the error.
Now that the ownership of the file or folder has been changed, you can now twerk permissions without having to meet the Failed to Enumerate Objects in the container error.
There are cases where the steps above still cannot solve the problem, failing at changing the ownership of the folder or file. If this happens you can check on the UAC settings and change it to Never Notify to disable such settings. The User Account Control (UAC) setting can sometimes prevent users from changing anything on the system, especially with files that may affect the operation and execution of commands and programs.
Only do this if you still are not allowed to change permissions on folder or files after doing the first method.
Sometimes running a set of commands also helps to restore your system from the “Failed to Enumerate Objects in the Container” error in Windows 10. So, we suggest you use the elevated command prompt if the above two methods don’t work. For that, launch the Run utility by pressing Windows + R and type in “cmd” in the box. Now press Ctrl + Shift + Enter to open the Command Prompt with administrative permissions. Ensure that you have an administrator account, as you might need it to allow the Command Prompt to make changes on your device.
If all goes well, next you have to execute the following commands. Don’t forget to press Enter in-between each command and replace “FULL_PATH_TO_FOLDER” with the path to your affected file or folder.
takeown /F X:\FULL_PATH_TO_FOLDER
takeown /F X:\FULL_PATH_TO_FOLDER /r /d y
icacls X:\FULL_PATH_TO_FOLDER /grant Administrators:F
icacls X:\FULL_PATH_TO_FOLDER /grant Administrators:F /t
Now, close the Command Prompt and try to change the permissions for the file or folder affected and check if the error is gone.
The easiest and most quick method you can follow to fix the error is by trying to restart your system in Safe Mode and then repeat the first method of changing the ownership of the file or folder. Since in Safe mode, the third-party services and programs don’t run, you won’t experience the issue of getting the file/folder lock issue. So, you should be able to easily access the folder or change its ownership accordingly. Also, if Safe Mode doesn’t work, you can try the same method in Safe Mode with Networking.
To do so, hold down SHIFT and select the Power icon. Click Restart from it. The “Choose an option” screen will display on your computer. Go to Select Troubleshoot → Advanced options → Startup Settings → Restart.
This will restart your computer in Safe Mode and you can make ownerships in the folder.
Important Note: To reboot your PC in Safe Mode, restart it normally. Then, as soon as the PC starts keep pressing the F8 key repeatedly. Various boot options will display, such as Safe Mode and Safe Mode with Networking. Select the one according to the requirement and follow the above methods. You can also select 4 or F4 to start your PC in Safe Mode, or select 5 or F5 to start your PC in Safe Mode with Networking.If you fail to fix the “Failed to Enumerate Objects in the Container” error after you use both takeown.exe and icacls.exe commands even when in Safe mode, it implies that there is a file system corruption. Therefore, it’s recommended to run the Chkdsk command on the affected partition.
To run Chkdsk on the C:\ drive, run the CHKDSK /R C:\ command from administrator Command Prompt. Chkdsk will run at the next boot. Now check if the error is fixed
Changing permissions and ownership of files and folders makes your PC more vulnerable and less secure, so always make sure that you are following the step-by-step instructions religiously to avoid modifying files that shouldn't be modified. Also, if the file does not necessarily need to be changed or modified, refrain from tweaking the settings to keep the system secure and working properly.
You need to be sure that there is a need to change permissions before proceeding. If you want, you can also have a professional do the work for you. They understand the security risks and can take the necessary steps to protect your files, and advise you whether you do need permission changes.
David Darlington
staff Editor