Lost access rights and permissions to secondary storage drive 'Program Files'. How do I regain control?

6,481

Source Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8:

Take Ownership of an Object using TAKEOWN Command

This command will take ownership of the folder or drive, and all files and subfolders in the folder or drive.

Open an elevated command prompt.

To grant ownership to administrators group:

takeown /F "full path of folder or drive" /A /R /D Y

Example:

takeown /F "E:" /A /R /D Y

To Take Ownership of Only a Folder or Drive using ICALCS Command

Open an elevated command prompt.

To set administrators group as owner:

icacls "full path of folder or drive" /setowner "Administrators" /C

Example:

icacls "E:\Folder" /setowner "Administrators" /C

To Take Ownership of a Folder or Drive and All Contents using ICALCS Command

Open an elevated command prompt.

To set administrators group as owner:

icacls "full path of folder or drive" /setowner "Administrators" /T /C

Example:

icacls "E:\Folder" /setowner "Administrators" /T /C
Share:
6,481

Related videos on Youtube

Leigh
Author by

Leigh

Updated on September 18, 2022

Comments

  • Leigh
    Leigh over 1 year

    My problem is - I am unable to delete/uninstall/overwrite all folders and files inside of 'Program Files' in my storage E: drive, my operating system is installed in C: drive.

    I've read posts of similar problems from here and other forums and I have tried everything and nothing seems to have had any effect.

    • I am an administrator
    • I have UAC disabled
    • I have total control over all files and folders in C: and every other folder in E: including Program Files (x86) so its only in E:\Program Files where I don't have control
    • I can create folders inside of Program files but when i try to delete them I get an error message : you require permission from administrators to make changes to this folder. Some folders/files say instead that I require permission from SYSTEM.
    • When I try and cut a New Folder I just created in program files it says it can't be completed because its open in another program.
    • I have installed 'Take Control' right click function and tried that function on various files and folders within program files including program files itself. This only gives error message: Access is denied.
    • In program files properties all accounts have full control except Users which only have read + execute, list folder contents and read permissions
    • I have tried program files right click, properties, security, advanced and anything I try and change in these options gives the error message: Unable to save permission changes on Program Files. Access is denied
    • I am unable to tick the boxes to 'include inheritable permissions....' and replace all child object permissions...
    • I am unable to edit anything in program files properties, security, edit, when I try change the owner to someone else it says an error occurred while applying security information : unable to set
    • Also I'm not sure if its related but I am unable to update to the latest version of itunes or anti malware bytes which are installed in E:\Program Files.
    • I have also tried running cmd.exe as admin and the whole takeown /f /r /a thing just says access is denied unless I am typing it in wrong, the instructions I found on this website in another post were kind of confusing. I structured it as: C:\takeown /f "E:\Program Files" /r
    • I also tried C:\takeown /f "E:\Program Files" and C:\takeown /r "E:\Program Files"

    I feel like perhaps I didn't follow one of the steps properly even though I have been relentlessly trying to solve this and have explored seemingly all possible solutions. I am knowledgeable with computers but not when it comes to registry editing and advanced command prompt rules etc.

    Please help me! Any advice is greatly appreciated!

  • Leigh
    Leigh over 9 years
    I completely agree, i have literally tried everything now and nothing has worked, i have already tried the take ownership right click option and i tried the program in your link but both didnt work. Thankyou so much for your help anyways :) :)