Take ownership of files and folders

Today, I was confronted with a group of misbehaving files and folders on my Windows server.  Even though I’m the domain administrator I was denied access.  Neither could I use the files in any applications.  Trying to change the rights using the “security” option didn’t work either – it was like these files were rebelling against me.

There’s a simple solution for this problem – all it takes is a simple command.  Read on if you want to learn how to take back what’s rightfully yours.

How to do it

1.  Open the command prompt as Administrator.  (For Windows 2008: Start > Right click “Command Prompt”

Run the Command prompt as Admin

2.  Enter the following command:  takeown /r /f , e.g takeown /r /f c:\rebels


The above command will make you creator / owner of the folder, and all files and folders in it.  You’ll see a lot of statements fly past you, until you get the message that the operation was a success.

3.  Now that you’re in control, show those files and folders who’s boss!  I’m reasonably sure that there’s a command you can use to set your permissions as well.

Did this post help you?  Do you know the command to set the permissions from the command line? Do you hate or love us?  Leave a comment!

2 thoughts on “Take ownership of files and folders”

  1. Would you mind having me link to this page from Akeeba Backup’s Troubleshooting Wizard? I have those occasional support requests from Windows users with funky ownership issues which can be fixed that way 🙂

Comments are closed.

Discover more from PowerUser Guide

Subscribe now to keep reading and get access to the full archive.

Continue reading