Windows 10: How to reset default file permissions for these directories?

Discus and support How to reset default file permissions for these directories? in Windows 10 Support to solve the problem; The other day, I was trying to fix Windows Default Apps not working by adding "ALL APPLICATION PACKAGES" to the following directories as indicated... Discussion in 'Windows 10 Support' started by Almighty1, Oct 24, 2015.

  1. Almighty1 Win User

    How to reset default file permissions for these directories?


    The other day, I was trying to fix Windows Default Apps not working by adding "ALL APPLICATION PACKAGES" to the following directories as indicated here:
    https://support.microsoft.com/en-us/kb/2798317

    However, it seems to have messed up the permissions as what I did was take ownership and then added both myself and "ALL APPLICATION PACKAGES".

    My question is, how do I reset the permissions of the following folders and their sub folders and sub files to the defaults:

    C:\Program Files
    C:\Windows
    C:\Users

    Does this command below do it?
    icacls * /T /Q /C /RESET

    My other question is will it fix the folders to the default inheritance if I enabled inheritance to child folders/files for a folder that was by default disabled or if I disabled inheritance to the child folders/files for a folder that is by default enabled?

    Other than the above, Am I correct that I will have to manually change the permission for each users folder under C:\Users so they own and have full control of that folder.

    :)
     
    Almighty1, Oct 24, 2015
    #1
  2. KwanKong Win User

    Reset Windows 10 file permissions to default

    Update:

    With a lack of replies, what I ended up doing was to reinstall Windows 10. This process removed many apps. The file permission issue was fixed but now I have to reinstall the apps.
     
    KwanKong, Oct 24, 2015
    #2
  3. Reset Windows 10 file permissions to default

    This did not help me and When I tried the Method 2 I got an error for each folder
     
    DavidMattoon-612, Oct 24, 2015
    #3
  4. How to reset default file permissions for these directories?

    TairikuOkami, Oct 24, 2015
    #4
  5. Almighty1 Win User
    I downloaded that earlier and opened it, except it requires running in safe mode. The problem is the system might not boot to safe mode's login screen until I fix the permissions as it will be stuck at the light blue screen with the spinning circle for 2 hours before it will show the login screen. Apparently, a in-place repair upgrade install of Windows will not fix the permissions.
     
    Almighty1, Oct 24, 2015
    #5
  6. Cliff S New Member
    It's only strongly recommended to run in safe mode. All you have to do is turn off your anti virus and run for your specific problem. This with running safe mode is a new recommendation from them. I have been using the tool for years now.
     
    Cliff S, Oct 24, 2015
    #6
  7. Almighty1 Win User
    Can't turn off anti-virus as Norton products have this problem where the disable part is greyed out listed under Hot Issues #4:
    HOT ISSUES FIXES - NIS/NAV/N360 22.5 | Norton Community

    In any case, I always thought AV's don't run under safe mode even if it was enabled.

    I'm still confused on the reset file permissions in the tool as it seems to indicate, it will add to the permissions, will it set the user/groups/owner back to default as well?

    As this is what it says:
    Reset File Permissions:


    The repair will grant administrators, system, users and everyone full rights to every file on the selected drives.


    This will only ADD the permissions, it will not remove current permissions or the owner of a file.


    When certain files lose their proper permissions, then lots of problems can happen, such as not being able to install windows updates, program errors, services failing and so on.


    WARNING: This repair can take a very significant amount of time to complete, depending on the speed of your CPU & the number of files on the drive.


    ******
    For Windows 7, 8, 8.1 & 10
    ******
    The program will set the default permissions instead of the full admin privileges that are done on XP.


    This way proper permissions are put back and your machine stays secure.


    ******
     
    Almighty1, Oct 24, 2015
    #7
  8. Cliff S New Member

    How to reset default file permissions for these directories?

    I was saying you can run it normally without going to safe mode. But the AV must be turned off, and your's won't let you.... hmmmm, I'm glad I stay with defender.*Devil Only the highlighted is what is done now, it was changed one or two versions ago, for system security reasons(plus users who didn't know what they were doing were breaking their systems when they had total control of their system.

    Also he's decided this program should "Repair" Windows, not "Tweak" it.
     
    Cliff S, Oct 24, 2015
    #8
  9. Almighty1 Win User
    To be honest, when someone mentioned the program in responses to others a few weeks ago, I thought it was advertising for the program but until you responded with your quality reputation, I didn't know to try it or not. LOL. In any case, my Norton was actually installed in Win7 as the update provided Win10 compatibility but it worked fine until a few weeks ago when it permanently was greyed out, normally a reboot will fix it but with the newer update of them trying to fix the problem, it made the problem permanent. After I fix the file permissions, hopefully it knows about the ALL APPLICATION PACKAGES for those folders, I'm going to do another in-place upgrade reinstall just to make sure Windows actually install correctly as it seems Windows doesn't change the permissions when it installs as I was wondering why the boot up was taking so long and going to Settings and trying to add a user would also be on Just a moment with the circle spinning for hours, I tried icacls * /T /Q /C /RESET while in the C:\Windows folder and that fixed it, now it opens up instantly like it's supposed to. I was wondering is there anything I can do because Default Apps including Store does not work even doing the in-place upgrade reinstall as basically what happens is C:\Program Files\WindowsApps does not have ALL APPLICATION PACKAGES as part of the permissions, if I added that and then did the Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}, all the apps would work, it won't work if I run the command without adding ALL APPLICATION PACKAGES first.
     
    Almighty1, Oct 24, 2015
    #9
  10. Cliff S New Member
    After the repair install have you checked your time zone setting and permissions & location settings in privacy settings in the settings app?
     
    Cliff S, Oct 24, 2015
    #10
  11. Almighty1 Win User
    Yes, and it's correctly set. The problem is more the All Application Packages which needs to be added to that folder first as this is the 5th repair install I did in the last week due to the Start Menu stop working, All Application Packages was manually added on September 12, 2015 reinstall and the original August 11, 2015 upgrade from Win7 but with those, the Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode} didn't work, I had to use Add-AppxPackage -register "C:\Program Files\WindowsApps\*\appxmanifest.xml" -DisableDevelopmentMode
    where * is the name of the app directory, only the apps in C:\Program Files\WindowsApps would not work as everything in C:\Windows\SystemApps works fine.
     
    Almighty1, Oct 24, 2015
    #11
  12. Cliff S New Member
  13. Almighty1 Win User

    How to reset default file permissions for these directories?

    Thanks Cliff S!

    I'm on a ASUS G74SX-3DE except pretty much what is said on that page is the same as what I mentioned in the original post above as the first solution is:

    Code: sfc /scannow[/quote] which for me, when I did it 3 times as recommended results in:

    Code: C:\WINDOWS\system32>sfc /scannow Beginning system scan. This process will take some time. Beginning verification phase of system scan. Verification 100% complete. Windows Resource Protection did not find any integrity violations. C:\WINDOWS\system32>sfc /scannow Beginning system scan. This process will take some time. Beginning verification phase of system scan. Verification 100% complete. Windows Resource Protection did not find any integrity violations. C:\WINDOWS\system32>sfc /scannow Beginning system scan. This process will take some time. Beginning verification phase of system scan. Verification 100% complete. Windows Resource Protection did not find any integrity violations.[/quote] Then:
    Code: Dism /Online /Cleanup-Image /CheckHealth[/quote]

    which results in:
    Code: C:\WINDOWS\system32>Dism /Online /Cleanup-Image /CheckHealth Deployment Image Servicing and Management tool Version: 10.0.10240.16384 Image Version: 10.0.10240.16384 No component store corruption detected. The operation completed successfully.[/quote] Then:
    Code: Dism /Online /Cleanup-Image /ScanHealth [/quote]

    which results in:
    Code: C:\WINDOWS\system32>Dism /Online /Cleanup-Image /ScanHealth Deployment Image Servicing and Management tool Version: 10.0.10240.16384 Image Version: 10.0.10240.16384 [==========================100.0%==========================] No component store corruption detected. The operation completed successfully. [/quote]


    then:
    Code: Dism /Online /Cleanup-Image /RestoreHealth [/quote]

    which results in:
    Code: C:\WINDOWS\system32>Dism /Online /Cleanup-Image /RestoreHealth Deployment Image Servicing and Management tool Version: 10.0.10240.16384 Image Version: 10.0.10240.16384 [==========================100.0%==========================] The restore operation completed successfully. The operation completed successfully.[/quote] It then mentions:
    Code: icacls "c:\programdata" /reset /T /C[/quote] In my case, what I did was using C:\Windows for example:
    Code: C: CD \Windows icacls * /T /Q /C /RESET[/quote] so the only difference is I'm specifying /Q.

    From the icacls usage info:
    Code: ICACLS name /reset [/T] [/C] [/L] [/Q] replaces ACLs with default inherited ACLs for all matching files. /T indicates that this operation is performed on all matching files/directories below the directories specified in the name. /C indicates that this operation will continue on all file errors. Error messages will still be displayed. /L indicates that this operation is performed on a symbolic link itself versus its target. /Q indicates that icacls should suppress success messages.[/quote] What I am confused about here when it says "replaces ACLs with default inherited ACLs for all matching files." is will it also replace each subfolder and their files so if a file or subfolder is set as inherit/disinherit or the opposite of what it is supposed to be, will it reset it back to what it was by default. I noticed when I did that command, Start Menu -> Settings -> Accounts -> Family & Other Users:
    Both Add a family member and Add someone else to this PC would open with Just a moment and the spinning cursor would not stop even after 3 hours but after the command above, it opens immediately. It does show Access Denied on some files when the command was run.

    I tried it on C:\Users and the problem is it shows Access Denied and also file not found for files that have long names or links somewhere else.

    The other things mentioned:
    Code: If this doesn't work, a person has a couple of choices: 1. Run dism /online /cleanup-image /restoreheatlh in admin cmd. I don't believe this advanced command was included in Win 7 by default, so a requirement for this would be to download the Windows 7 WAIK from Microsoft.com which would include the full Deployment and Imaging Tools Environment 2.Attempt to use dism with the /source command, however, the source must be either a Windows installation disk for your architecture of Windows, or an offline Windows installation of the same architecture which DISM can copy files from 3.The easiest way, although more time consuming, will be to use your Windows Installation Media to "upgrade" to the same version and architecture of Windows that is currently installed. This is called a Repair Install and it must be perfomed like an upgrade, i.e. the installation must be rain from within the booted OS, and the "upgrade" option must be selected. This will allow you to keep all installed programs and user data, although there may be a handful of programs and drivers that may need to be installed if they installed files into the %windir% [Windows Folder], as a repair install replaces all system files within the %windir% and a select few other locations.[/quote] I already did #1 as indicated above, have not tried #2. As for #3, it doesn't reset the file permissions because what happened was Windows would go to that light blue screen and I can see it install updates, reboot, install updates again on the light blue screen then it would reboot and stay at the light blue screen after it says Just a moment with the spinning circle for about 2 hours. Seems like Windows is keep fighting with the permissions. With the repair in-place upgrade, after installing, it logs into the account by default after the password but when I reboot, it basically goes to that light blue screen to perform the updates, reboot and then it would be stuck at the light blue screen with the spinning circle after the Just a Moment for about 2 hours. So it seems like this doesn't fix the permissions issue which icalcs did when I performed it on C:\Windows mentioned above. What I'm thinking about doing is maybe copy those folders in C:\Program Files\WindowsApps for things that I added which are no longer available elsewhere. delete C:\Program Files\WindowsApps as a folder altogether and let the Windows in-place upgrade install recreate it but is there a good way to have it recreate the start menu and the default tiles as it seems one cannot delete the C:\Users\<login>\AppData\Local\tiledatalayer folder as it will just create a new vedatamodel.edb file which will result in a Start Menu with no tiles and when the Windows in-place upgrade install is done, it will just use whatever vedatamodel.edb was already there so if it was broken, it would not fix it. I also noticed that even when I add a new user, the default apps do not work either and I always have to manually fix it for the user added.

    Also saw this:
    Resetting NTFS files security and permission in Windows | lallous lab

    which is basically the icacls method and they have a new tool as well:
    Resetting NTFS files permission in Windows lab

    Got the original idea here:
    https://www.winhelp.us/troubleshooting-windows.html
     
    Almighty1, Oct 25, 2015
    #13
  14. Cliff S New Member
    I'm starting to wonder if Norton is getting in the way of your repairs.

    Have you tried taking ownership of the folders and files and then tried resetting their permissions?

    I'm also curious, is there a reason you just haven't backed up your data files, 3rd party program installers and drivers and just tried a clean install?
     
    Cliff S, Oct 25, 2015
    #14
  15. Almighty1 Win User
    It could be Norton but not too sure since there was a time I manage to disable Norton before doing the repairs. The thing is that Windows Installer will not overwrite the Start Menu and Default Tiles if the Database folder and files exist in the TileDataLayer folder and ofcourse tiledatamodelsvc would write new database files so when Windows Repair Install is done, the start menu will just be blank where the default tiles are. My thinking is that it can be the Windows Updates that is causing the problems in the repair as well as some updates that did not exist before might be the problem for all I know.

    As for backing up data files, 3rd party program installers and drivers, the reason is this is basically a already built system and should I upgrade in the future, I want to get it back to the way it was out of the box if I need to sell it, besides, I don't have the installers for everything that came on the system and even ASUS doesn't provide it for download. On the ASUS ROG Forums, there are others who did a clean install and actually ran into problems with certain hardware not working. My issue is really minor as I've always managed to fix it manually except it seems like the default tiles created which I am not sure is dependent on when the install is done or if it's based on when the new account is created as I always create a new administrator account after the Repair Install to generate the tiledatalayer\Database files which I can use for the start menu and I have noticed with the August 11, 2015 install, all the default tiles link to actual installed apps, in this case default apps but with all the September 12, 2015 to repair installs of today, it seems the default tiles I have 3 tiles for I<3Radio, Minecraft Windows 10 Beta Edition and Flipboard but those apps are not on the system, is there actually a way to pin items linking to individual apps in the store without installing it? The resetting of permissions for other folders works fine but not with C:\Users as it would remove the users name from their folder so that process takes a lot of time to do even though I am the only user so need to do my own folder again manually. I noticed doing it the GUI way takes minutes but using the command prompt would take 4-5 hours to go through all the files.

    I basically used the GUI tool I mentioned in the last post by checking everything except Reset hidden and system files which actually does a attrib -h -s on files which just unhides the files to make it visible but anyways, this is what it runs in a elevated command prompt using C:\Windows for example and it did keep the "All Applications Packages" in the permissions list for C:\Program Files, C:\Windows, C:\Users and C:\Program Files\WindowsApps:
    Code: takeown /r /f C:\Windows\* icacls C:\Windows\* /T /L /Q /C /RESET[/quote] The other reason is that this is my only working computer at the moment so upgrade installs would have minimal downtime as whatever the problems may be, I am still able to use the computer with just cosmetic issues which I cannot afford if I did a clean install as reinstalling apps is time consuming and I already am on time constraints with emails and such that are 6 years behind.

    In any case, I already reset the permissions for the folders involved, now only inheriting myself back to my C:\Users folder,
    and basically renamed the C:\Program Files\WindowsApps Folder so the in-place upgrade install would regenerate it from scratch, added a new Admin user account so I will run the Windows in-place repair upgrade install after deleting TIleDataLayer\Database in my own account so I can login as myself at the end of the install so it will recreate the Database folder just as a experiment to see what happens as I don't have the capability to go back to Windows 7 as the Windows.old folder is basically going back to the same version of Windows 10. When I get the default tiles back, then I'll do the Start Menu -> Settings part as it seems there are certain things like Cortana one has to setup on a in-place upgrade. I figure that the other route I can take is to basically get 10240 RTM fixed manually and then upgrade to a insider build instead just to see if it still has the same problem as I can easily go back to 10240 RTM. Ofcourse being a rocket scientist, I like to try to fix issues and learn something new at the same time. It's almost like if there was a hole in the wall in a house, fixing it is one way and tearing down the entire house to rebuild is another. Besides, should someone else run into similar problems, they will have a solution as someone has got to do it first. I have always upgraded my desktop machine ever since Windows 3.0 by just cloning the hard drive to a new one whenever I upgraded to newer motherboard/cpus and new hardware. Windows has advanced a lot since the Windows/286 and Windows/386 days before OS/2 came out.
     
    Almighty1, Oct 25, 2015
    #15
Thema:

How to reset default file permissions for these directories?

Loading...
  1. How to reset default file permissions for these directories? - Similar Threads - reset default file

  2. Resetting ALL permissions to default

    in Windows 10 Gaming
    Resetting ALL permissions to default: I have been silly and played with the security settings on my Windows 11 laptopIs there some way to return ALL to a new build status ?ie Default everything without carrying out a rebuildI am being blocked from using many programs such as Ancestry/FTM because I am unable to...
  3. Resetting ALL permissions to default

    in Windows 10 Software and Apps
    Resetting ALL permissions to default: I have been silly and played with the security settings on my Windows 11 laptopIs there some way to return ALL to a new build status ?ie Default everything without carrying out a rebuildI am being blocked from using many programs such as Ancestry/FTM because I am unable to...
  4. To Reset Default user permissions

    in Windows 10 Gaming
    To Reset Default user permissions: I want to reset all default permissions to my pc please help https://answers.microsoft.com/en-us/windows/forum/all/to-reset-default-user-permissions/13ef7e2e-fad5-40f3-8b3c-f4beb09150f1
  5. To Reset Default user permissions

    in Windows 10 Software and Apps
    To Reset Default user permissions: I want to reset all default permissions to my pc please help https://answers.microsoft.com/en-us/windows/forum/all/to-reset-default-user-permissions/13ef7e2e-fad5-40f3-8b3c-f4beb09150f1
  6. How to reset all permissions to default?

    in Windows 10 Network and Sharing
    How to reset all permissions to default?: I couldn't find this anywhere and I really need help about this.Long story short, I thought RESTRICTED PACKAGES, ALL PACKAGES and TrustedInstaller were viruses so I removed their permissions from wherever I could but it turned out to be Windows 10's feature and the...
  7. How to reset default file type.

    in Windows 10 Network and Sharing
    How to reset default file type.: I accidentally made it so .css opens in internet explorer, how do i make it go back to however .css would open? https://answers.microsoft.com/en-us/windows/forum/all/how-to-reset-default-file-type/9cd5b0fa-894b-4413-b993-227cb3995e89
  8. Default User Directory No Permission - is that right?

    in Windows 10 Support
    Default User Directory No Permission - is that right?: I have a crowded desktop and reducing the icons in my user desktop directory didn't help much so I figured they're all in the default user directory. but when I went to get in there I go told I had no permission. when I looked at the permissions nothing seemed to have any...
  9. How to reset NFTS file permissions?

    in User Accounts and Family Safety
    How to reset NFTS file permissions?: You could lleave it as fat32 but convert to ntfs is bomb proof as its a MS tool
  10. WindowsApps reset default permissions

    in User Accounts and Family Safety
    WindowsApps reset default permissions: Is there anyway to reset the permissions back to Account Unknown() for the WindowsApps folder? I wanted to have a look in it, I changed the ownership to myself and now I just want to reset it back to the default. The default was Account Unknown(sequence of some kind), but you...