If you had to change the permissions of files and folders in Windows 11/10 for some reason, and if you want to reset the permissions to default, this post will help you. One of the users reported that he had to set the ownership and permissions to everyone and full control for a specific task, and now that it’s done, getting back to the default permission is difficult. Since the option is not built into the system, we will have to use the secedit
and icacls
commands to reconfigure. You can also use the subinacl Tool.
How to reset all User Permissions to default in Windows 11/10
Security is essential, and it is not just that other users can access the files, but programs you install on the computer also get the same access. The good news is that fixing the permissions to default is easy, and all you need is to run a command-line program to fix it. Before going ahead, create a system restore point, so in case things go wrong, you can restore.
- Run icacls command
- Run Secedit command
- Use Subinacl Tool
You will need admin permission to execute the commands.
Reset all File & Folder Permissions to default
1] Run icacls command
Another method to resolve this using the icacls command. However, you will need first to take ownership of the folder and then execute the command. Windows uses the Access Control List to configure permissions for all files and folders. Icacls is a command-line utility that can display and modify the permissions on specified files and apply them.
It comes with a reset option that replaces ACLs with default inherited ACLs for all matching files. We will use the following options to reset
- t—Operates on all specified files in the current directory and its subdirectories.
- q—Suppresses success messages.
- c—Continues the operation despite any file errors. Error messages will still be displayed.
Next, run the following on an elevated command prompt—
icacls * /t /q /c /reset
Once done, you must save the permission into a file that you can use again later or apply to other computers.
2] Run Secedit command
It allows you to configure and analyze system security by comparing the current config with a template.
Configures and analyzes system security by comparing your current security configuration against specified security templates.
Type CMD in the Run (Win +R) prompt and then press Shift + Enter to open it with admin permission
Execute the following command-
secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
You may get some warning, but you can safely ignore it.
3] Use Subinacl Tool
Download the Subinacl tool developed by Microsoft. If you have Windows Resource Kit installed on your system, you will find its SubInAcl.exe file in the C:\Program Files\Windows Resource Kits\Tools folder. It is not available as a separate download now but you can download it via Microsoft archived page.
Install the package in the C:\Windows\System32 folder path.
Next, open Notepad and type in the following commands, and save it as a .cmd file. You could name it Reset UserPermissions.cmd:
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f subinacl /subdirectories %SystemDrive% /grant=administrators=f subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f subinacl /subdirectories %SystemDrive% /grant=system=f
Run this file to reset the user permissions.
Changing permission on Windows is tricky because there is no way to switch back to default permission once you change it. It should have been there right from the start and let Windows users fix it themselves.
I hope these commands were useful and helped you reset file & folder permissions to default in Windows.
Now read: Restore TrustedInstaller as Owner and its Permissions to default in Windows.