How to take Ownership of a Drive, Folder or File in Windows 7

Isn’t it just a pain in the butt. A fresh install of Windows 7 64-bit and I’m trying to copy files over from Windows Vista and I get Access Denied! Here’s how to fix it.

I’ve tried a registry key addition from MyDigitalLife which is all very nice but it attaches itself to a right click context menu which only works once you’ve opened the drive, I couldn’t, it’s quite handy though if it’s just a file or folder you want to take control of, you can download a copy here. I want to take control of the whole drive not just a folder or file and I couldn’t open the drive without getting an Access Denied error.

Microsoft in their infinite wisdom have decided to take control away from us foolish, ignorant and hardened system administration professionals and in their blind panic that running any program at all is going to cause a fatal exception or get riddled with viruses.

Fortunately there is a simple’ish way around Microsoft’s latest Uber decision using the Command Prompt to get all your drives, folders and files back – Yippee!

Are you ready? Well just follow along now…

Click on ‘Start ‘ which incidentaly isn’t called Start anymore it’s just the round glowing icon.

In the Run box (the text enrty bit) type CMD – but don’t press the Enter Key! Wait for the CMD icon to appear in the menu above, then right click on it and select Run as Administrator.

When the UAC (panic control) box appears just click Continue.

Now that your command prompt window is open type this: (adapted for your own use)

takeown /f (full path of your file)

In my case because I wanted to take control of my D: drive I typed:

takeown /f d:

Now press Enter.
You should get a message saying that it has completed successfully – this gives you ownership of the file.

Now type:

icacls (full path of file) /grant (your username):F

Press Enter.

In my case I used:

icacls d: /grant mycomputername\simon:F

And away your little system goes re-writing your permissions, you should now have complete control over your files. I had a little padlock in the bottom left of my files and directories which looked ominus, but you only have to click on them or their containing directory and Windows 7 will report that you are now taking full control of this file/directory etc…

If Windows is still causing you grief there’s always going down the pub – which isn’t always a bad idea.

Many thanks to Snake08 for his help on this.

Comments

comments



5 Comments

  1. Comments  Dave   |  Monday, 11 October 2010 at 7:03 am

    Yeah um I got “This media is write protected” when trying to take ownership… Any tips?

  2. Comments  umar   |  Friday, 18 February 2011 at 9:45 pm

    thank you soooooooooooooooooooooooooooooooo much dear. i love you………… ;)

  3. Comments  Jim   |  Monday, 06 February 2012 at 7:29 pm

    THANK YOU!

    Seen lots of methods, but this was the only one to work. Again, THANK YOU!

    Jim

  4. Comments  Tom   |  Monday, 02 April 2012 at 9:01 am

    I get a message “ERROR: access is denied.” after typing the takeown command. I DID run command prompt as admin.
    Any help is appreciated. Thanks

  5. Comments  Carlton   |  Wednesday, 04 April 2012 at 12:47 pm

    Thanks this really helps me out… I’m a ‘paranoidist’, lol… I fresh install all the time and that gets daunting. I rotf about the start orb joke too… keep up the good work.

Leave a Reply