Locked Admin out of Folder by disabling inherited permissions from parent

Blaise Parker 21 Reputation points
2022-09-27T20:06:16.893+00:00

I disabled inherited permissions of an HR folder from its parent folder, but I failed to exclude Admin from this action.
No one can currently access this folder.
I am the IT manager, and the pc is connected to the domain.
MS 365 Case #33098175 and Consumer User support case 1044372228 did not resolve the issue.

As a user with admin privileges, what can I do to gain access back into the folder in question?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,195 questions
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 32,911 Reputation points
    2022-09-28T15:54:34.4+00:00

    When you changed the permissions, what accounts or groups did you grant access to? Or did you remove all permissions? You had to leave someone or some group with access.

    The folder is on a mapped network drive.

    I would suggest that you RDP to the server and log in with an admin account. Then reference the local drive path.

    Does the Windows explorer see the folder? Have you tried taking ownership from there? Can you see the permissions?

    Try this takeown command. It will make Administrators the owner of all files and subfolders. Once you get access back you can go clean up the permissions with explorer.

    takeown /d Y /a /r /f  "D:\Data\HR-whatever"  
    

3 additional answers

Sort by: Most helpful
  1. Dillon Silzer 56,681 Reputation points
    2022-09-27T20:12:36.857+00:00

    Hi @Blaise Parker

    You could use elevated command prompt (run command prompt as Administrator) with the TAKEOWN cmd:

    Example:

    takeown /f "C:\users\folder\subfolder" /a

    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/takeown

    ---------------------------

    If this is helpful please accept answer.


  2. Blaise Parker 21 Reputation points
    2022-09-28T13:46:51.777+00:00

    Hi DillonJS

    Thank you for the response.
    When I run the command as Administrator, I get an error message stating "The system cannot find the file specified".
    However, I have tried running the command under my user credentials with out the /a parameter and it shows "success", although I still cannot access the file.

    Any thoughts?


  3. Blaise Parker 21 Reputation points
    2022-09-28T15:13:06.3+00:00

    MotoX80

    The folder has spaces in the name, and I am using quotes to enclose the full path in the command
    The folder is on a mapped network drive.
    dir of the parent folder lists this folder
    dir of this folder shows "File Not Found"

    0 comments No comments