File Access Denied on Windows XP and how to take ownership

In a recent hard disk crash, I had to do a restore from my back-up. Some of the files on a back-up drive was somehow avoiding me with an “Access Denied” even though I was logged in as the Administrator. I looked around and finally got the solution on how to take ownership of a file or folder in Windows.

Here are the simplified steps.

  1. Log on to the computer with an account that has administrative credentials. If you are running Microsoft Windows XP Home Edition, you must start the computer in safe mode, and then log on with an account that has Administrative rights to have access to the Security tab.
  2. If you are using Windows XP Professional, you must disable Simple File Sharing.
  3. Right-click the folder/file that you want to take ownership of, and then click Properties.
  4. Click the Security tab, and then click OK on the Security message (if one appears).
  5. Click Advanced, and then click the Owner tab.
  6. In the Name list, click your user name, or click Administrator if you are logged in as Administrator, or click the Administrators group. If you want to take ownership of the contents of that folder, select the Replace owner on subcontainers and object check box.
  7. Click OK, and then click Yes when you receive the following message:
    You do not have permission to read the contents of directory folderName. Do you want to replace the directory permissions with permissions granting you Full Control?
    All permissions will be replaced if you press Yes.
  8. Click OK, and then reapply the permissions and security settings that you want for the folder and its contents.

That’s it.

  • Anonymous

    Thanks a lot for this info! Exactly what I was looking for...!

  • Anonymous

    Thanks a lot for this info! Exactly what I was looking for...!

  • Fredrik

    Many thanks! This one certainly saved my day.

  • Fredrik

    Many thanks! This one certainly saved my day.

  • Arne

    Bummer, that doesnt work. The files are from another computer I discarded and are encrypted. No way to get access even though I am the one that encrypted them in the first place.

  • Arne

    Bummer, that doesnt work. The files are from another computer I discarded and are encrypted. No way to get access even though I am the one that encrypted them in the first place.

  • Craig

    Perfect, this solved my problem, can't thanks you enough!

  • Craig

    Perfect, this solved my problem, can't thanks you enough!

  • Deon

    Thanks very much! It had been so long since I'd seen the Security tab in WinXP Home that I forgot how to get to it.

  • Deon

    Thanks very much! It had been so long since I'd seen the Security tab in WinXP Home that I forgot how to get to it.

  • J.

    Well and what to do if there is no Security tab in the preferences dialog of a particular folder? Logged in as Admin, all attempt to touch the folder results "Access denied"

  • J.

    Well and what to do if there is no Security tab in the preferences dialog of a particular folder? Logged in as Admin, all attempt to touch the folder results "Access denied"

  • sean

    Wow this worked Great, i backed up a Computer and it told me that the files were private. well this did the trick

  • sean

    Wow this worked Great, i backed up a Computer and it told me that the files were private. well this did the trick

  • Jean-Pierre

    Man! Thanks SOOOO much for this! It helped to get back files from a directory I "shared" on the network that never shared properly. After disabling sharing, I had no access to the directory or any of the "non-existent files" inside. (Properties kept saying the directory was 0 bytes when there are many databases inside totalling 500MB+ each!

    So thanks! This sorted out my problem!

  • Jean-Pierre

    Man! Thanks SOOOO much for this! It helped to get back files from a directory I "shared" on the network that never shared properly. After disabling sharing, I had no access to the directory or any of the "non-existent files" inside. (Properties kept saying the directory was 0 bytes when there are many databases inside totalling 500MB+ each!

    So thanks! This sorted out my problem!

  • Adrian

    Does this methord work if your recovering files from another machine that has died?

  • Adrian

    Does this methord work if your recovering files from another machine that has died?

  • Arne

    This method only works if the files were not encrypted. If they are encrypted you are out of luck.

  • Arne

    This method only works if the files were not encrypted. If they are encrypted you are out of luck.

  • There is a simpler way that does not require in XP Home to go to Safe Mode. See my review about FaJo XP File Security Extension. I spent three hours to realize my problem was related to ownership and not to process lock. In 5 minutes I solved it by this German too.

  • There is a simpler way that does not require in XP Home to go to Safe Mode. See my review about FaJo XP File Security Extension. I spent three hours to realize my problem was related to ownership and not to process lock. In 5 minutes I solved it by this German too.

  • dude

    This helped tremendously. My situation was this: my desktop's motherboard failed, needed documents off the desktop's hard drive. Bought a IDE SATA to USB cable, connected desktop hard drive to laptop's USB port, tried accessing documents but ran into "access is denied" because desktop was password protected. Found this site, had to look up how to turn off simple file share (found solution here: http://support.microsoft.com/kb/307874 ) and at this moment I am taking ownership of my desktop files! Thanks for the solution.

  • dude

    This helped tremendously. My situation was this: my desktop's motherboard failed, needed documents off the desktop's hard drive. Bought a IDE SATA to USB cable, connected desktop hard drive to laptop's USB port, tried accessing documents but ran into "access is denied" because desktop was password protected. Found this site, had to look up how to turn off simple file share (found solution here: http://support.microsoft.com/kb/307874 ) and at this moment I am taking ownership of my desktop files! Thanks for the solution.

  • D-Man

    Thank you so much!!!!! This was a quick solution to what I was trying to do... I thought I was going to have to deal with resetting permissions and crap for days or even weeks. Again, thank you, thank you, thank you!

  • D-Man

    Thank you so much!!!!! This was a quick solution to what I was trying to do... I thought I was going to have to deal with resetting permissions and crap for days or even weeks. Again, thank you, thank you, thank you!

  • ganesh narayan chitrekar

    I Have changed the ownership of the files but still it is not accessible...

    please tell me how can i get it done?????

  • ganesh narayan chitrekar

    I Have changed the ownership of the files but still it is not accessible...

    please tell me how can i get it done?????

  • Amazed

    YOU HAVE SAVED MY LIFE!!!! MY COMPUTER CRASHED AND CREATED A NEW PROFILE FOR ME. IT'S working beautifully except I lost all my old content. I was able to move my docs into the new profile and am now the owner of a working computer thank you thank you thank you.

  • Amazed

    YOU HAVE SAVED MY LIFE!!!! MY COMPUTER CRASHED AND CREATED A NEW PROFILE FOR ME. IT'S working beautifully except I lost all my old content. I was able to move my docs into the new profile and am now the owner of a working computer thank you thank you thank you.

  • CLOYD SHIFFER

    This information is great. I tried another article but they didn't mention that in Windows XP home you had to start the computer in the safe mode to get to the security tab.
    Thanks a million.
    Cloyd Shiffer

  • CLOYD SHIFFER

    This information is great. I tried another article but they didn't mention that in Windows XP home you had to start the computer in the safe mode to get to the security tab.
    Thanks a million.
    Cloyd Shiffer

  • Boyd

    Got me back into a hijacked Hosts file. Like most everyone else above has said, great advice. Many thanks.

    Boyd

  • Boyd

    Got me back into a hijacked Hosts file. Like most everyone else above has said, great advice. Many thanks.

    Boyd

  • Sarah Riblon

    This was excellent information. Solved in 2 minutes what I have been trying to figure out for 2 hours! Thank you so much!

  • Sarah Riblon

    This was excellent information. Solved in 2 minutes what I have been trying to figure out for 2 hours! Thank you so much!

  • bob

    Hello,
    i have problem with this.. i have follow the step but the files still can't be open..

    im using winxp profesional sp2
    with disable simple file sharing

    anyone can help??

  • bob

    Hello,
    i have problem with this.. i have follow the step but the files still can't be open..

    im using winxp profesional sp2
    with disable simple file sharing

    anyone can help??

  • Thanks! Just what I was looking for. On my system the security tab was not visible. You wrote to disable simple file sharing, here's how [for future reference].

    1 - Open Folder Options in Control Panel. (Click Start, click Control Panel, click Appearance and Themes, and then click Folder Options.)

    2 - On the View tab, under Advanced settings, clear the Use simple file sharing [Recommended] check box.

  • Thanks! Just what I was looking for. On my system the security tab was not visible. You wrote to disable simple file sharing, here's how [for future reference].

    1 - Open Folder Options in Control Panel. (Click Start, click Control Panel, click Appearance and Themes, and then click Folder Options.)

    2 - On the View tab, under Advanced settings, clear the Use simple file sharing [Recommended] check box.

  • JohnnyMartini

    Brilliant! Brilliant! Bloody Brilliant! Saved my life.... Thanks X

  • JohnnyMartini

    Brilliant! Brilliant! Bloody Brilliant! Saved my life.... Thanks X

  • Pedro

    Thanks a lot! You've save me a lot of time. 5*

  • Pedro

    Thanks a lot! You've save me a lot of time. 5*

  • luke

    No go! WinXP Pro SP3:

    There is no check box for "Replace owner on subcontainers and objects" in the owner tab. Am I missing something? Anyone?

  • luke

    No go! WinXP Pro SP3:

    There is no check box for "Replace owner on subcontainers and objects" in the owner tab. Am I missing something? Anyone?

  • Kathir

    I tried the same but its not working.. please help me.

  • Kathir

    I tried the same but its not working.. please help me.

  • Pip

    I have my files back!! Very pleased. Thank you for your great guidelines.

  • Pip

    I have my files back!! Very pleased. Thank you for your great guidelines.

  • egypro

    u r the best, thanks so much

  • egypro

    u r the best, thanks so much

  • swer

    thanks man
    it really helped to me

  • swer

    thanks man
    it really helped to me

  • chaosakita

    Thank you so much! I was afraid I was going to lose all of my files, but now they're all fine!

  • chaosakita

    Thank you so much! I was afraid I was going to lose all of my files, but now they're all fine!

  • D.Prabhu

    THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX

  • D.Prabhu

    THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX THANX

  • PArth Thacker

    in the sharing network, the administrator has blocked certain privileges, i can have a look at those fils but i cant copy them nor open them.
    it says access denied.
    any solution guys?

  • PArth Thacker

    in the sharing network, the administrator has blocked certain privileges, i can have a look at those fils but i cant copy them nor open them.
    it says access denied.
    any solution guys?

  • Suzanne

    Wow! Whew! It worked perfectly. THANK YOU!!

  • Suzanne

    Wow! Whew! It worked perfectly. THANK YOU!!

  • Dave

    GREAT< After all the crap suggestions I found and tried it was a breath of fresh air to find this and have it work.

    Next I must fix the no disk issue.

    Thanks

  • Dave

    GREAT< After all the crap suggestions I found and tried it was a breath of fresh air to find this and have it work.

    Next I must fix the no disk issue.

    Thanks

  • JMGL

    ooooooo thanks a lot

  • JMGL

    ooooooo thanks a lot

  • Brian

    I have a weird solution, so I am writing this is the hope that it will be useful so somebody. The solution described above did not work for me because when I right click the folder and choose "properties" there isn't a "Security Tab". This may be because I am not using "simple file sharing". I have tried many things suggested on various web pages all to no avail. My problem is that I accidentally dragged and dropped one of my data folders to a folder with a really long gobbledegook name - this is probably some kind of system folder. Although I could see my data folder I could not open it or drag it back again to where it should be. I discovered by trial and error that any file/folder that I dragged and dropped to this particular place became similarly inaccessible. But I did finally stumble of a solution that worked!!! I created a new folder in the root of my C: drive and copied the gobbledegook folder to my new folder lock, stock and barrel, and bingo, all of my locked folders became accessible again - so I copied them back to where they should have been. I then copied the gobbledegook folder back to where it came from.

    • Summer

      Thank you, Brian! I as well do not have a "Security" tab, but your solution worked for me.

  • Brian

    I have a weird solution, so I am writing this is the hope that it will be useful so somebody. The solution described above did not work for me because when I right click the folder and choose "properties" there isn't a "Security Tab". This may be because I am not using "simple file sharing". I have tried many things suggested on various web pages all to no avail. My problem is that I accidentally dragged and dropped one of my data folders to a folder with a really long gobbledegook name - this is probably some kind of system folder. Although I could see my data folder I could not open it or drag it back again to where it should be. I discovered by trial and error that any file/folder that I dragged and dropped to this particular place became similarly inaccessible. But I did finally stumble of a solution that worked!!! I created a new folder in the root of my C: drive and copied the gobbledegook folder to my new folder lock, stock and barrel, and bingo, all of my locked folders became accessible again - so I copied them back to where they should have been. I then copied the gobbledegook folder back to where it came from.

  • Ken Cook

    I have been,for hours, scouring the Microsoft site in an attempt to solve this problem, the google search too. By a lucky hid I got to this site and article and in 2 minutes solved the problem. Why in the Hell didn't include XP Home in it's fixes I'll never know. Thanks again.
    Ken Cook

  • Ken Cook

    I have been,for hours, scouring the Microsoft site in an attempt to solve this problem, the google search too. By a lucky hid I got to this site and article and in 2 minutes solved the problem. Why in the Hell didn't include XP Home in it's fixes I'll never know. Thanks again.
    Ken Cook

  • Ianz

    This is brilliant, simple easy and it works, thanks to poster.

  • Ianz

    This is brilliant, simple easy and it works, thanks to poster.

  • Thanks! I've been looking for a solution for this problem for ages. 🙂 finally deleted those pesky folders that have random strings!

    Thank you!

  • Thanks! I've been looking for a solution for this problem for ages. 🙂 finally deleted those pesky folders that have random strings!

    Thank you!

  • I have a problem like this, but at Windows 2003 where the server do not give me the ownership... and did the CHKDSK /F, but still not doing it... the Admin cannot get the file security info... so, if a Admin cannot, who can?

  • I have a problem like this, but at Windows 2003 where the server do not give me the ownership... and did the CHKDSK /F, but still not doing it... the Admin cannot get the file security info... so, if a Admin cannot, who can?

  • Jimmy

    Who would have EVER thought that "Use Simple File Sharing" would cause such pain? You are the ONLY person I've found who pointed out this "simple" tick mark on the Tools->Folder Options->View-> Advanced Settings.

    You rock, SIR!

    Cheers->

    Jimmy

  • Jimmy

    Who would have EVER thought that "Use Simple File Sharing" would cause such pain? You are the ONLY person I've found who pointed out this "simple" tick mark on the Tools->Folder Options->View-> Advanced Settings.

    You rock, SIR!

    Cheers->

    Jimmy

  • Kimmie

    I solved this problem by opening up the HD through an APPLE computer. This help me retrieve all my info off of disk.

  • Kimmie

    I solved this problem by opening up the HD through an APPLE computer. This help me retrieve all my info off of disk.

  • Sam

    This is good info but what about if you don't have access to an admin acconut do you know how to take ownership through other methods.

  • Sam

    This is good info but what about if you don't have access to an admin acconut do you know how to take ownership through other methods.

  • Marcos

    Thanks, this really worked!! 🙂

  • Marcos

    Thanks, this really worked!! 🙂

  • Kassie

    This did work great! Now a question. If you put the hard-drive back in after you take ownership to run a repair do you have to relinquish ownership? (Windows XP) If yes, do you reverse the process?

  • Kassie

    This did work great! Now a question. If you put the hard-drive back in after you take ownership to run a repair do you have to relinquish ownership? (Windows XP) If yes, do you reverse the process?

  • Guest

    and what if we deny access dvd jedninica

  • Brian

    thanks for that!!

  • Events

    thank you thank you thank you.... 😉

  • Shriparna

    Hi,

    Thanks for the wonderful solution. You can try this link http://www.deletelongfile.com also.
    Hope it will help you.

  • Yogie Rinaldy

    Thank you very much!!!

  • Wrauberto

    A sincere thank you for this fix and a sarcastic thank you to M$ for making this so difficult.

  • Rjones

    Thank you very much. I don't know why these crazy things happen, but this fixed it.

  • Hi BRAJESHWAR,

    Thank you for your post regarding access denied on windows xp

    If it will not work, from my side I can also recommend to try http://LongPathTool.com

  • Very Very Thanks for given this solution , i very kind of you
    -Senthil

  • Prasannatpj

    thank you man

  • rama devi

    c drive access denied error msg showing while formatting. say how can overcome this pleaseeee.....

  • Sameergolwala

    I have Win XP sp3. I have no security tab on old folder. The simple file sharing already enable. how would I open it? Thanks.

    • Evilkenivel6

      you need to DISABLE simple file sharing. open a random folder>tools>folder options. its the last one. DISABLE simple file sharing. as in NO check mark. 

  • Evilkenivel6

    make sure simple file sharing is disabled (open my computer>tools>folder options>view, all the way at the bottom UNCHECK simple file sharing. then right click on the harddrive>properties>security>advanced>owner> click administrator and check the box at the bottom (replace owner on subcontainers and objects)  make sure that box is checked and press ok. let it work its magic. it will take a while.  then try to format it.

    >>>>PRO TIP. if your operating system is running off of that harddrive you cannot format it. you need to boot off of another harddrive or boot off of a cd (XP or WINDOWS 7 cd to format and then install the new operating system.)    if you format it will erase EVERYTHING on that harddrive.

    • Gauravgargy12

      Thknx your process is Good..

      It's working easiable

  • I'm running winxp home, with service pack 3.  Everything was working fine until recently when I try to share a file on my home network, the option for sharing is no long available.  The three tabs I get when I right click on a file are General, DFS  and customize.  I'm not sure what happened but if anyone can help it would be great.   thank you

  • Bazza

    Thank you so much... I had "lost" all my pics and documents to the dreaded "windows root>system 32hal.dll" missing or corrupt message on boot-up.   I successfully managed to install another copy of XP in another partition but could not access my original files (Access denied) thanks to you I have copied all the files to my new partition and am free to format and reinstall on partition one... happy days

  • Kursem

    I have do it. But, when I copying, it's always the same, "Cannot copy : Access is denied. Make sure the disk is not full or write-protected and that the file isnot currently in use."

  • Herman Aartsen (NL)

    thank you for this help. Keep on believing in simplicity!

  • mohamad alikhani

    thanks

  • noahng

    My problem is I don't see the Security option and so I can't take "ownership". Can anyone help?

  • I cannot "take ownership" as I keep getting access denied. I have unjoined from the domain and rejoined to the domain and I still cannot change the default permissions on C:. I have tried using the local admin and the domain admin with the same result. A Windows repair did not change the result. Anything else?

  • vikas
  • Peter

    Excellent! Worked perfectly once I realised I had to log on in Safe Mode as the original Administrator rather than my newly created Administrator. Many thanks, saved the day!

  • pavan pandey

    wow u r great thank u vry much

  • THIS WAS SUCH A BIG HELP!! THANK YOU!! I had to start the computer in safe mode. That wasn't mentioned in the Microsoft website!!

  • Yiyit Prayitno

    Its realy work. thanks a lot ....

  • raj

    awesome bro thank u saved my ***, u are great. thanks for this article

  • Dr.Sohail Nabi

    Thank you from the core of my heart you have solved for me a problem that was causing me to have hypertention, now I have regained my files and important documents that I had backed up.

    • You're welcome.

    • Amnaa Haya

      and my all documents must be back up with ur whatspp num larkio k dalal

  • Alex

    I dont have the security option. On the properties what can I do ?

  • Adham Dahab

    Use Permissions Time Machine v1.0 to restore default permissions to folder or files or registry keys it's free and fast and easy

    http://goo.gl/730w8z

  • leslysab

    Try and download " Long Path Tool " is also useful in situations where you see these error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.

  • leslysab

    I just download and use "Long Path Tool" guarantees to fix your error fast and easy. Try it.

  • girish

    i transferred files from c drive and then formatted only c with xp.
    now, access is denied. i've taken ownership.
    but i still can't access.
    the parent is listed as some S1-S23.... kind of serial, and not one of the users(administrators/Users)
    what to do?

  • Colton Colcleasure

    Thank you so much. This was a life saver. Almost lost years of my life.

  • Sridhar MV Sharma

    Thanks a lot bro.....ur jus awesome.....it worked....muahh 🙂

  • Dave

    I was getting a possible failure error message about my hard drive so I replaced it. Since then I can access all the folders and files (as far as I can see) except for one, which of course is the most used and important.

    I tried some of the suggestions found here but none have solved the problem.

    I am running WinXP, do not have the 'Security" tab, and am wondering why only the one folder is not accessible.

    Please help.