• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How to change permissions in windows 7

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Mandrake4565

Mr. Clean Senior Member
Joined
Jan 12, 2012
One of my hard drives that was once a main hd is now a back up drive. It still has windows 7 on it. I would like to delete the windows program from it as well as the program files but it keeps saying that I need administrative permission to do it. The pc has only one user with administrative rights. I have tried taking ownership through the advanced security tab to no avail. Any suggestions?
 
Thanks Thiddy I'll try that.

bchur, I can't format it because I have pictures, music and various other things saved on it. Thanks though.
 
Ok Thiddy I followed the post you linked me and went into the below tab, I tried changing ownership to each of the names and also checked the replace owner to sub and objects hit apply and ok closed everything down re-opened it and it still says I need administrative privileges. I only have 1 user on this pc and have full administrative rights, what am I doing wrong?
 

Attachments

  • win7.PNG
    win7.PNG
    42.2 KB · Views: 68
  • win71.PNG
    win71.PNG
    14 KB · Views: 69
In the first screenshot, click your username instead, check the "Replace owner on subcontainers and objects", hit Apply, and follow the prompts. Close out of the properties windows and change the security settings. You should be able to now delete the folder.

So, to clarify, there are two steps:
1) Take ownership of the folder including subfolders and files
2) Set the security for the folder including subfolders and files
 
I think I did all that and still giving me the same message. I'll work on it some more in the morning, too tired to think straight now. Thanks for the help. Mike.
 
If it isn't working, you are probably missing a step. Get a good night's rest and try it again in the morning.
 
Redduc it's not an old installation on the primary drive it's a windows installation on the previous "primary drive" that is now used as a back up.

Thiddy, I tried it all over again with a single folder inside my program files, "adobe". Mike (Mike-PC\Mike) is the current owner. Under the security tab Mike (Mike-PC\Mike) all the permissions are "checked" allow but it still is saying the same message I posted above. I know it can't be this hard I must be doing something wrong.
 
Changing security rights through the GUI "can" work, but a console is going to be much more effective.

Take ownership of the target drive (x being the target drive)
Code:
takeown /a /r /f x:

Give yourself permanent permissions to the drive and subfolders
Code:
icacls x: /inheritance:e /grant Administrators:F

These commands are going to touch each file on the target drive so you may need to walk away or do something else until they finish...

EDIT: I have never actually done an icacls command against an entire drive. If it errors out, then you may need to navigate to the drive in the console and then run icacls against each folder. Having ownership of the folders>subfolders & files is needed though so neither command alone will solve your problem.
 
Last edited:
Take Ownership of a File or Folder
http://technet.microsoft.com/en-us/library/cc753659.aspx

You will need to apply to all subfolders and files.

One thing to consider is that Windows isn't always concerned with who owns the object. "You might own it, but that doesn't mean you get to look inside." The principal of least privilege often screws a lot of users if they only take ownership. However, if you take ownership, you can then modify the ACL through an elevated command which gives you permanent access.

"Physical access trumps everything"
 
One thing to consider is that Windows isn't always concerned with who owns the object.
I know about this and I clarified later by stating he needed to take ownership and set the security for the folder. I realized too late that my link only had the ownership part.
 
I know about this and I clarified later by stating he needed to take ownership and set the security for the folder. I realized too late that my link only had the ownership part.

310534f5-ec95-46c9-bdfd-5594ae1bc3e7
 
This is where I'm at, I am the owner of the drive and under the security tab I have full rights. I still cannot delete the Program files. I even tried taking ownership on the entire drive and I receive the same message. I also tried going into the cmd and using the method aspect put up and it says "the current logged on user doesn't have administrative privileges." There is only one user name on the pc and is the administrator. Any ideas?
 
If your command prompt says you don't have admin rights, did you run it as administrator?

To clarify, you are trying to delete the Program Files that isn't in use, right?
 
thideras;7341060]If your command prompt says you don't have admin rights, did you run it as administrator?
No I didn't run it as administrator, I figured because I was the administrator I didn't have to do that. I retried it running as the admin and it worked but gave me a syntax error at the end.

To clarify, you are trying to delete the Program Files that isn't in use, right?
Yes it's old program files on a backup drive that I don't need.
 
What was the syntax error on the icacls command?

You could try:
Code:
icacls x:[Folder Name] /grant Administrators:F

So, if there is a space in the folder name, make sure to encase in quotes.

Code:
icacls "x:\Program Files" /grant Administrators:F

Better yet would be to navigate to the root of the drive inside the command prompt

Code:
x:

The run the commands without the drive being specified.

Below is a screenshot of how it should work.
 

Attachments

  • cmd.png
    cmd.png
    16 KB · Views: 49
Back