Cannot take ownership to folder

Михаил Андросов 396 Reputation points
2022-08-26T07:39:43.263+00:00

I'm domain administrator and have all permission into folder on the file server.
I met with such a problem. I need to delete a file in a folder, but I can't do it.
When I open the Security tab I get a message:
You must have Read permissions to view the properties of this object
I know that in such cases it is necessary to change the owner of the file to your account.
But when I try to change the owner to my account I get an error message:
You do not have permission to view or edit this object's permission settings.
The file server runs on Windows Server 2012 R2.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,133 questions
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 39,651 Reputation points
    2022-09-01T07:21:01.897+00:00

    Hello,

    In this case I would recommend to takeover ownership through commandline, following the next steps:

    Step 1: Press Windows + R to invoke Run window.

    Step 2: Input cmd and press Ctrl + Shift + Enter to run your Command Prompt as administrator.

    Step 3: Type the command lines takeown /F Path (Path should be replaced by the actual path of the problematic file) and press Enter key to take ownership of the file.

    Step 4: Type the command lines icacls Path /grant administrators:F and press Enter key to grant Administrators full control permission for the file.

    If it still does not work, try:

    Last but not least, as a last resource you can access in Safe Mode as Administrator which would ensure that you don´t have any locks on the file or path.

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

    --If the reply is helpful, please Upvote and Accept as answer--

    5 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Mark Stepan 0 Reputation points
    2024-07-28T16:09:32.35+00:00

    Crazy. I wasn't able to delete a user profile's folder either. I believe it was due to the way Google Drive Sync does some crazy sh** locally, but can't be positive. After screwing around (Registry, Folder Properties, Security, Ownership, Command Line (TakeOwn, ICACLS, etc)), ironically, I WAS able to MOVE the folder. Once I moved it (I just slapped it on the desktop to see if that would work --- I was shocked when it did), I WAS able to delete it.

    Obviously there's a chance that the combination of my trying to take ownership and/or change security could (likely have?) contributed, but ultimately, thankfully, I was able to delete the damn thing. Whew.

    Hope this helps someone!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.