Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Basics about file/folder permissions on Win 7

2I have a laptop that's about a year old, and right after I got it I moved the built-in HDD to be its secondary drive and added an SSD as the primary drive with windows 7 & ubuntu. I kept the OED windows installation on the hdd in case something went wrong, but now the drive is almost full and those are taking up ~ 40GB and I want to delete them.

When I try to delete them, it just says "You need Administrator access", I click yes, and it fails with another popup whose only option is "try again" (I do have full admin access on this machine). So I right click on one of the folders e.g. Program Files, choose properties -> security -> edit but all the allow & deny checkboxes are greyed out for all of the users.

Of course all the help menu links are useless, the similar questions on microsoft forums are dead ends that just tell you to use system restore, etc. Is there any way to force delete these folders? It seems like kind of a ridiculous question to have to ask, but then again windows is kind of a ridiculous system and I wouldn't be surprised if there's no way to do this short of reformatting the drive. But if someone does know of a way, I would be very grateful.

share|improve this question
    
You need to take ownership of the folders before you can edit the permissions. When you move a drive from another system it has the ownership set to an account the new pc does not recognize, so you need to take ownership of the folders you need to delete....blogsdna.com/2159/… –  Moab Apr 29 '12 at 23:53
    
That's what I'm saying, this doesn't work. I changed ownership, so when I open the owner menu it says I'm the owner. Then I go to change permissions, and when I click apply I get an "Error Applying Security" pop-up, that says "Access is denied" for each subfolder, so I hit cancel. When I go back to look at permissions, the boxes (including "Full Control") are checked for me. But I still get the "You need permission to perform this action" pop-up when I try to delete the folder. This is why I say I can't change the permissions. Is there no sudo rm -rf equivalent in windows I can use? –  danny Apr 30 '12 at 0:17
add comment

marked as duplicate by Moab, studiohack Apr 30 '12 at 19:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

Try the command line of taking ownership and setting permissions.

a. Go to > Start > All Programs > Accessories

b. Right-click on Command Prompt, and then click Run as Administrator.

c. Type the following command and press Enter key:

takeown /f [path to folder] /r /d y

EDIT:

if that does not help try resetting permission on the entire drive

  1. For an entire storage drive or partition, do not use this on the system drive

example is usb drive D: run 2 commands, first sets the target drive, second resets the permissions for the target drive D:

D:

.

icacls * /T /Q /C /RESET

.

Once permissions are reset see if you can delete or take ownership if needed.

.

share|improve this answer
    
It looked like it worked, and when I went to set "Full Control" for all of the users there was no error pop-up. But when I go to delete, it still gives me the "You require permission from Danny-PC\Danny to make changes to this folder" pop-up (and that user is me) with only Try Again and Cancel buttons. I also tried rd /s /q from the command line and just get a bunch of "Access denied" –  danny Apr 30 '12 at 19:35
    
check my edit above –  Moab Apr 30 '12 at 19:47
    
If this resolved your issue, you should accept this answer. –  Tom Auger Jan 4 '13 at 18:20
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.