通常在Windows中,权限帮助我们将内容保密或公开。因此,我们很容易将这些权限分配给我们的文件和文件夹,以便其他人可以根据需要调用或不调用。可以通过右键单击文件夹/文件并选择Properties来更改文件夹/文件的权限。从这里通过切换到安全( Security)选项卡,我们可以配置权限。
如何修复无法枚举容器中的对象,访问(Access)被拒绝?
由于权限(Permission)问题或条目,可能会出现容器(Container)错误消息。当前所有者的文件或文件夹权限可能不允许这样做。因此,您可能需要检查子对象权限条目。
但是,有时由于权限冲突或设置不正确,您可能无法更改权限并在执行此操作时遇到错误。在这种情况下,最常见的错误如下:
无法枚举容器中的对象,访问(Access)被拒绝
当您不是内容的所有者时,您更有可能遇到此错误,您正在更改其权限。因此,在这种情况下,以下是您应该采取的避免错误的确切步骤。(exact)您可以通过以下三种方式之一进行:
1]更改文件夹权限
1.首先,右键单击您要更改其权限的文件夹/文件。选择属性(Properties)。
2.接下来,在“属性(Properties)”窗口中,切换到“安全(Security)”并点击“高级(Advanced)”选项。
3.继续,在下图所示的屏幕中,您必须按数字单击以遵循顺序。即,首先在高级安全设置(Advanced Security Settings)窗口中单击所有者的(Owner)更改(Change)链接。
然后单击“选择用户或组”窗口中的“(Select User or Group)高级(Advanced)”选项,然后在打开的另一个窗口中单击“立即查找” 。(Find Now)
在这里,您需要在如此列出的搜索结果下选择您的用户帐户。(Search Results)
然后单击确定 > 确定 > 应用 > 确定。
4.上一步将带您回到步骤 2(step 2)中显示的窗口,因此单击此处的高级(Advanced)选项。
现在在高级安全设置(Advanced Security Settings)中,您必须选中替换子容器和对象的所有者,(Replace owner on subcontainers and objects)并使用该对象的可继承权限条目替换所有子对象权限条目(Replace all child object permissions entries with inheritable permission entries from this object)。
单击应用(Apply),然后单击确定(OK)。
因此,最后,您可以在步骤 2( step 2. )中显示的窗口更改权限。您现在不会遇到任何错误。
完成此操作后,您需要再次打开属性(Properties)窗口 >安全(Security)选项卡> Advanced > Permissions > Add > Select原则> Enter您的用户帐户名 > 确定。
请注意,当您更改权限时,它确实会使您的电脑“不那么安全”。
2]使用命令提示符
先创建系统还原点,然后打开提升的命令提示符窗口,依次执行以下命令:
takeown /F X:\FOLDER-PATH
takeown /F X:\FOLDER-PATH /r /d y
icacls X:\FOLDER-PATH /grant Administrators:F
icacls X:\FOLDER-PATH /grant Administrators:F /t
通过运行这些命令,您将更改用户文件夹权限。
3]禁用UAC
如果您无法更改权限(Permission),则需要更改UAC 设置(UAC settings)。让它从不通知(Never notify)。成功执行设置任务后,您可以将UAC设置恢复为默认设置。
但是,我们不建议(do not recommend)您永久禁用用户帐户控制来禁止此类警告,因为UAC在保护您的计算机方面发挥着更大的作用。
让我们知道这是否对您有用。
(Let us know if this worked for you.)
Failed To Enumerate Objects In The Container
Generallу in Windows, permissions help us to keep content private or public. Thus it is very easy for us that we assign such permissions to our files and folders, such that others may invoke or not, according to the requirement. The permissions for folders/files can be changed with right-click on folders/files and selecting Properties. From here by switching to the Security tab, we can configure the permissions.
How do I fix Failed to enumerate objects in the container, Access is denied?
The Container error message can appear due to Permission issues or entries. The file or folder permissions for the current owner may not allow this. You may therefore need to check the child object permission entries.
However, sometimes due to a clash of permissions or incorrect settings, you may not be able to changes permissions and face errors while doing so. In such scenarios, the following error is most common:
Failed to enumerate objects in the container, Access is denied
You’re more likely to face this error when you’re not the owner of the content, whose permissions you’re changing about. Thus in such cases, the following are the exact steps you should take to avoid the error. You can do it in either of the three ways:
1] Changing Folder Permissions
1. Firstly, right-click over the folder/file whose permissions you’ve to change. Select Properties.
2. Next, in the Properties windows, switch to Security and hit Advanced option there.
3. Moving on, in the below-shown screen, you have to click number-wise to follow the sequence. That is, first click Change link for Owner in the Advanced Security Settings window.
Then click Advanced option in Select User or Group window, and then click Find Now in another window so opened.
Here you need to select your user account under the Search Results so listed.
Then click OK > OK > Apply > OK.
4. The previous step takes you back to the window shown in step 2, hence click Advanced option there.
Now in the Advanced Security Settings, you must check Replace owner on subcontainers and objects and Replace all child object permissions entries with inheritable permission entries from this object.
Click Apply followed by OK.
Thus finally, you can change permissions the window shown in step 2. No error would be encountered by you now.
Having done this, you need to again open the Properties window > Security tab > Advanced > Permissions > Add > Select principle > Enter your user account name > OK.
Do note that when you change Permissions, it does make your PC a ‘bit less secure’.
2] Using Command Prompt
Create a system restore point first and then open an elevated command prompt window and execute the following command one after the other:
takeown /F X:\FOLDER-PATH
takeown /F X:\FOLDER-PATH /r /d y
icacls X:\FOLDER-PATH /grant Administrators:F
icacls X:\FOLDER-PATH /grant Administrators:F /t
By running these commands, you will have changed user folder permissions.
3] Disable UAC
If you are unable to change the Permission, then you need to change UAC settings. Make it Never notify. Once you have carried out the set task successfully, you may revert UAC settings to default.
However, we do not recommend that you disable the User Account Control permanently to suppress such warnings as the UAC has a larger role to play in securing your computer.
Let us know if this worked for you.