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
icacls commands to reconfigure.
How to reset File & Folder permissions to default
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
You will need admin permission to execute the commands.
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.
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.