Situation: The client is running Windows server 2019. When he tries to take over owner on one of the folders with “Replace all child object permissions entries with inheritable permission entries from this object.’ option checked, he gets this message: ‘Failed to enumerate objects in the container. Access is denied’
Resolution 1: Use takeown command, for example
takeown /f * /r /d y
- means all folders and Fiels in the current directory. To see more options, run this command: takeown /?
Resolution 2: propagate the owner
propagate the owner, then close out of ALL dialogs, before you propagate the actual permissions.
I can’t really say how it got messed up, but this should fix it. These steps are a bit involved, but just take it step-by-step (some users print them and mark off what step they’ve done). If you get stuck, just let me know what step you’re on.
- Press Windows+R to show the Run box.
- Type (or copy/paste) %userprofile% (including the percent signs) into the box and hit OK to open your user profile folder.
- Right-click the Documents folder and go to Properties.
- On the Security tab, click Advanced.
- At the top, make sure the “owner” is set to your account. If it already is, please skip to step 6.
- If the owner is not you, click Change.
- Click Advanced
- Click Find Now
- Select (highlight) your account in the list (it may be a name or email address depending on your setup), then click OK to close the search box.
- Click OK again to close the “select a user” box.
- Turn ON checkbox for “replace owner on subcontainers and objects” (this makes sure you are the owner for everything under your documents folder also).
- After the checkbox is on, click OK close the “advanced security” box.
- Click OK again to close the Documents Properties box. At this point, you should be back where you were after step 2 when you opened the User Profile folder.
- Right-click the Documents folder again, and go back to properties,
- On the Security tab, click Advanced, then continue with step 6 below.
- Click “Add”
- Click “Select a principal”
- Click Advanced
- Click Find Now
- Select (highlight) your account in the list (it may be a name or email address depending on your setup), then click OK to close the search box.
- Click OK again to close the “select a user” box
- Turn on “Full Control” checkbox.
- Click OK to close the Permission Entry box.
- Click OK again to close the “Advanced Security” box.
- Click OK again to close the Documents Properties box. At this point, you should be back to where you were after step 2 when you opened the User Profile folder.
Note: We find we need to run takeown /f * /r /d y on each level of the folder or each subfolders.