The problem turned out to be that I was on a workgroup, not a domain, and so the systems didn't have any common notion of "Administrator". Although Explorer knows how to request elevated permissions, this still isn't enough. You have to "Take Ownership" of the files in order to delete them, and there's no way to do this from Explorer.
I found a solution in the winmatrix forum, but it only works for files, not directories. You can't set the Full Control permission on a directory, so you end up being locked out of directories if you try and use these commands:
takeown /f filepath /r
icacls filepath /grant yourusername:f /t
(I've added /r and /t to the commands, which is required for the them to operate recursively.)
Instead, I did the steps below. These steps assume that the new drive is on E:.
- Open a Command Prompt with Run As Administrator.
- Run this command:
takeown /f e:\ /r
- Right-Click on the root of the copied drive.
- Select Properties.
- Click the Security tab.
- Click the Edit button.
- Select Authenticated Users.
- Click the checkbox under Allow for Full Control.
- Run this command:
icacls e:\*.* /reset /t
This command will force all permissions to mirror the permissions on the root of the drive that you set in #6. You must have the *.* or the root directory will be reset, which you don't want.
thanx, worked well
ReplyDeleteThankyou SO much. I'd just set up a new system and needed to resolve a external HDD permission issue. After hours of searching this done it.
ReplyDeleteworked like magic, ty sir
ReplyDeleteI wasn't looking for deletion of the files but for discovery by Windows 8, this helped me out by resetting all of the mess I created changing permissions, now my problem is resolved!!!
ReplyDeleteWorked like a charm, thanks you.
ReplyDeletethanks thanks thanks! had screwed up permissions on ext. drive connected to wndr3700 router after trying to set certain folders for access by friends on the 'net...d'OH!
ReplyDeletethis worked for me, too!!!
once more--thanks!
It worked unlike everything made by Microsoft......PERFECTLY.
ReplyDeleteThank you SO much. Major help and prevented more down time from a bad registry from an OS I had to re-install which is why I needed to move files from an HDD. I'm bookmarking your site for the future.
gENIUS ....
ReplyDeletewoooaaaahhh,...... thank you soooo much... :) cheers.....
ReplyDeleteRock On !! That worked for me :)
ReplyDeleteIt works for me. You safe my day. I like you bro =)
ReplyDeleteThanks for taking the time... all done and working o.k
ReplyDeleteI love you man!
ReplyDeleteTHANK YOU!!!!!! You saved me 2.2 TB worth of files
ReplyDeleteHow can I go about making my external hdd accessible to any computer I plug it in to and how do I make that permanent? I'd hate to have to do this every time I plug it in somewhere.
ReplyDeleteIn my example code, instead of "yourusername", use "Everyone". I believe that works across computers.
DeleteWorked exactly as described. Thanks!
ReplyDeleteThanks! I tried everything and just messed things up worse. Your how to saved my bacon
ReplyDeleteno doubt, this is perfectly worked for me !
ReplyDeletethank you :)
thank you sir...
ReplyDeleteThank you :D!!!
ReplyDeleteWorked a treat thank you.
ReplyDeletei love you. i wish i found this 9 hours ago.
ReplyDeleteJim, I hope you don't mind, but I'm sending you a big kiss! :-)*
ReplyDeleteFantastic, this is definitely the fix! Thanks for posting.
ReplyDeleteAfter four days of trying to get control of my files some that date back to the 1940s and paying avast to get me access to the partition that used to be C:\ now D:\through some magical efforts but still not bootable your command line got the files released from the permissions monster I am copying everything to an external drive formatting the harddrive and returning the files back to the new C:\ reinstalling win 10 or going to try to repair win 10 first I did not reset the permissions so there was no confusion between the temporary win 7 setup and the win 10 existing setup this is the meanest nastiest virus/malware/trojan I've ever seen its heartless I type this as I pray for a lifetime of memories not to be lost. THANKYOU so much. STEPHEN NORMYLE
ReplyDeleteWorked great on non system files but when it came to them Not so well if like to know if there is a command ie like the command
ReplyDelete"takedown /f D:\ /r"
That is the command I used on a fixed disk to recover a corrupted ownership I didnot reset permissions because the job was not complete ..any help will be greatly appreciated
for me didnt worked cus now i need my own permission..lol how...no clue.
ReplyDeleteThank you very much, that's what I was looking for since few days!
ReplyDeleteBrilliant, thanks
ReplyDeleteThank you so much - this was a life-saver!
ReplyDeletethis is awesome.. thank you
ReplyDeleteTnx man
ReplyDeleteIs there perhaps an update this helpful article? It's 2019 and I followed the steps to the letter in Win 10 on an External 8TB Seagate drive and still a bunch files on that drive refuse to be copied to another location. By now EVERY imaginable user on my PC has FULL rights to these files. Still no go. Those a family picture so I must keep multiple copies, quite distressed over this. Tried accessing the same files via Linux (USB boot) and the permissions hold! I am at my wits ends..
ReplyDeleteIt worked...... wow🤸♂️ so happy thanks
ReplyDeleteThank Jimmy.
ReplyDeleteCan not get my laptop to work.it says group profile access is denied
ReplyDeleteCan not get my laptop to work.it says group profile access is denied
ReplyDeleteIf icacls encounters an error it quits unless you add /c. If it quits in the middle of resetting 1,000,000+ files on a large drive, you end up wasting a lot of time because there's no way to restart in the middle. The command should be
ReplyDeleteicacls e:\*.* /reset /t /c >icacls.log 2>&1
This also saves the output to a file, which you can then examine after the command completes, to find any errors.
Oh man! Thanks a lot. You just have saved my life.
ReplyDeleteThank you! this is very helpful
ReplyDeleteperfect ,, Thank You
ReplyDeleteAn old post but thank goodness it was still around! I have been looking for a solution for a week. I rejuvenated an 8 year old WIN7 PC with a 2nd drive (E:) that was dedicated to music on my homegroup network. When I wiped the C: and reinstalled a clean copy of Win10, E: did not like that I left it out, and decided that it wouldn't allow me access. Your fix worked - thanks very much!
ReplyDeleteStill working like a charm for windows 10.. Thank you for this post..
ReplyDeleteMy issue is with a NAS mapped drive. "takeown" brings up error "file ownership cannot be applied on insecure file systems; there is no support for ACL's" - whatever that means.
ReplyDeleteNo security tab in properties and yet another mapped drive has the tab.
Apparently, I'm an idiot! This did not work for me. Both me and my wife have gotten new computers (Dell with Windows 10 Pro). And new external harddrives as well. I had no issues with getting my files from old drive to new. But with my wife, everything except one folder copied with no problem. I can access the folder and see all the files and filenames. But cannot modify any of them or move them. Any other help would be greatly appreciated! Thanks!
ReplyDelete