0

I've got some files that I wish to delete. They are on a local hard drive. This hard drive has never been near any other operating system. I am the administrator, and the only administrator, for this machine, and every other machine this hard drive has been in. There have never even been any other administrators- not even a guest account. But Windows will not permit me to remove these files. It says that I need permission from "S-1-5-21-4140038465-826365687-30361609-1001". I've tried altering the permissions but Windows rejects me for not having permission. I don't get it. I am the administrator, and the file system should be under my complete control at all times.

How can I get rid of these files?

Edit:

Now it says I need permission from myself. WTF is wrong with this thing?

13
  • Where are the files that you're trying to delete located?
    – Jeremy
    Dec 2, 2011 at 4:27
  • @JeremyBanks: A hard-drive plugged in to a SATA-2 port on the machine.
    – DeadMG
    Dec 2, 2011 at 4:28
  • 1
    Can you try changing the owner to yourself in the advanced permissions?
    – Paul
    Dec 2, 2011 at 4:40
  • Being a local administrator on a Windows NT system is not the same as being a superuser on a Unix or Linux system. For instance: The idea that as a local administrator you have full access to everything, is false. Unlearn that falsehood.
    – JdeBP
    Dec 2, 2011 at 14:46
  • 2
    @DeadMG: That's true, but that only means that you can claim ownership of everything. It doesn't mean you have all rights.
    – MSalters
    Dec 2, 2011 at 19:18

5 Answers 5

1

I would recommend using "Unlocker" http://www.emptyloop.com/unlocker/

It is a program just for that, it releases the files and can execute any action on them like deleting them.

Once installed, you just have to "right click" on the file/directory you want to delete and use the asistant to delete them.

1
  • This worked for me and got rid of the files.
    – DeadMG
    Dec 2, 2011 at 21:08
2

A command-line solution could be icacls <filename> /reset. If you need to take control first (it appears you already did), that would be icacls <filename> /setowner <newowner>. In that case, <newowner> should be your accountname, and of course be an Administrator.

4
  • Nope. It said success, but I still can't get rid of it.
    – DeadMG
    Dec 2, 2011 at 19:51
  • This doesn't work. It says "Access is denied."
    – Patrick
    Apr 9, 2016 at 14:35
  • @Patrick: Are you an administrator and did you take ownership?
    – MSalters
    Apr 11, 2016 at 8:57
  • @MSalters yes and yes.
    – Patrick
    Apr 12, 2016 at 17:51
1

As said by Paul, you'll need to take ownership of the files to change the permissions.

Right click the files and go to the Security Tab. Click Advanced and then to owner. Change Ownership to the Administrators group.

3
  • I did that, and the change seems to have taken effect, but I still can't change the permissions or delete the files. It says that Administrators are the owner and have all the permissions, but I still can't do anything.
    – DeadMG
    Dec 2, 2011 at 16:37
  • Have you checked to see if permissions to Administrators have been denied? A good place to check is under the Effective permissions tab.
    – surfasb
    Dec 2, 2011 at 19:26
  • Yes, I have- they are granted.
    – DeadMG
    Dec 2, 2011 at 20:30
1

Make a liveCD of a linux/unix environment, mount your hard drive, and delete the files. There's no reason this shouldn't work.

0

As others have remarked, it helps to take ownership first of all.

Make sure you're trying to delete the files from an elevated command prompt. In order to elevate the command prompt, in the start menu type "cmd", right click the command prompt icon that appears, choose "Run as administrator" (which of course does not mean what it says).

Why command prompt: Windows Explorer has a history of bugs where it keeps files open. For example, when saw an AVI file, it would fire up an icon generator that would hold the file open forever, preventing deletion. Which could be pretty embarrassing depending on the AVI file contents! :-)

So, use a command prompt and make sure that no process is holding the files open. You can in principle use the "openfiles" command to check. However, it has gone fast downhill since once it was "oh" (open handles) in the resource kit, and while its modern output is almost useless, it's pretty arbitrary whether it's even capable of producing that at all.

A better tool might be the process explorer from SysInternals.

However, when Microsoft discovered that SysInternals made actually working tools, they bought the company or hired the person (I'm not sure if it was a proper company or just the web site name). What this means is that the process explorer is now available from Microsoft, or was. Which means it cannot really be trusted now, but better than anything Microsoft itself has produced (such as "openfiles").

Cheers & hth.,

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .