Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Lost Access Permissions to C:\Users\All Users\Application Data Folder

14 Feb 2015   #11
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Okay.

You are going to restore the C:\Users\All Users\Application Data junction's permissions to what they where originally, by using Icacls' save command on the exact identical file/folder on another computer B, import the ACL txt file (that Icacls genorates) from computer B to computer A, then, with the ACL txt file, run Icacls restore on the item that needs fixing.

It's a simple two step procedure. All commands mentioned here should ideally be run in an elevated Command Prompt.


Step 1.
Option A.
Execute the Icacls /save command on the exact same Application Data folder that lives on another computer B. E.g.
Code:
icacls "C:\Users\All Users\Application Data" /save "C:\Users\%username%\aclsave.txt"
Import this C:\Users\%username%\aclsave.txt file to computer A (which holds the file/folder that needs fixing) by any means possible. I.e. You can copy paste the contents of the ACL file, that Icacls generates, from computer B to A.

OR

Option B.
Step a.
If you know that another file/folder on computer A holds the correct permissions, you can save and restore those permissions instead. No second computer needed.

In this case, because other junctions in the All Users (symbolic link) directory have the correct, unmodified, original permission set up as the Application Data junction, you can just take the permissions of one of those junctions, and replace them with Application Data's.

E.g. the C:\Users\All Users\Desktop "folder" has the correct permission layout as C:\Users\All Users\Application Data. So we can save and restore Desktop's permissions onto Application Data and achieve the same effect as importing Application Data's permission information from another computer.

Code:
icacls "C:\Users\All Users\Desktop" /save "C:\Users\%username%\aclsave.txt"
Step b.
If you choose this option, you need to perform the additional step of cracking open the ACL file in a text editor and changing the very first line of the file to the name of the file/folder that is going to be fixed. This first line is obviously how Icacls should know what file to look for when restoring.

In this case, Application Data is the folder (junction) that needs fixing, so swap "Desktop" to "Application Data" on the first line (file names are case insensitive). Close the text editor.


Step 2.
Now that the ACL data file is somewhere on computer A, (let's say it's in the users home directory of computer A right now: C:\Users\%username%\aclsave.txt), we can get to restoring permissions onto Application Data. The following command will use the aclsave.txt file created in Step 1 to restore the permissions of Application Data in C:\Users\All Users,
Code:
icacls "C:\Users\All Users" /restore "C:\Users\%username%\aclsave.txt"

What to do if Step 2 produces an 'Access is denied' message
If an "Access is denied" message displays when restoring C:\Users\All Users\Appliction Data with Icacls, it means that the current access control permissions set on the item denies your user from both reading and write permissions to the object. If this occurs, make a note of the current owner of the file/folder, then take ownership of the item using the command,
Code:
takeown /f "C:\Users\All Users\Appliction Data"
Run the Icacls /restore command once again.

Then change the owner back to what it should be. The correct owner for Appliction Data is "System". So the command for giving ownership would be
Code:
icacls "C:\Users\All Users\Appliction Data" /setowner "SYSTEM"

Note that Icacls save and restore does not correct ownership. Ownership does not affect ones access to a file/folder, so giving ownership back to the correct user is completely optional.


My System SpecsSystem Spec
.
24 Feb 2015   #12
A1955Harley

Windows 7 Professional
 
 

Pyprohly,
Used your commands and things are all set to the correct settings.
Thanks for the help
My System SpecsSystem Spec
Reply

 Lost Access Permissions to C:\Users\All Users\Application Data Folder




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Installing profile based application in other users folder
Hi All, Im trying to install AT&T application which is a profile based application. Means it installs in the user profile directly instead of other location. My Problem is user dont have the admin access, either i need to use my ID or administrator ID. Which installs application into...
Installation & Setup
C:\Users\All Users\Start Menu - Access Denied !!!
How do I add custom items to the above folder ? I need to add shortcuts for our corporate ERP application.
Installation & Setup
Setting permissions per specific users and folders for access from OSX
Hello all, Got a few questions regarding our network sharing. Here is the setup, we have a "server" running Windows 7 Ultimate 64-bit. This server has a RAID setup with a shared folder containing projects. These projects need to be accessed by certain users, but should limited to certain...
Network & Sharing
I lost my limited user account folder icon in Users folder.
I clicked on the Hidden box of Properties for a couple of my folders. I lost my limited user account folder in the Users folder. How do I get it back? Thanks, theAdmiral
General Discussion
All users Application Data
I need to access the "Application Data" folder under "All Users" and have been unable to do so. Initially I was denied permission so I changed ownership of the folder but now instead of an "access denied" message, it simply opens the main "All Users" directory in a new window without entering the...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:57.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App