Reset File and Folder Permissions to Default in Windows

File and folder permissions in Windows control who has access to files and folders, and what they can do with them. By default, Windows assigns permissions to files and folders based on the user’s account type. For example, users who are members of the Administrators group have full control over all files and folders on the system.

However, it is possible for users to change the permissions for files and folders. This can be done accidentally, or it can be done maliciously. If you find that you have lost access to a file or folder, or if you are concerned that someone else has changed the permissions for a file or folder, you can reset the permissions to their default values.

How to Reset File and Folder Permissions to Default in Windows

To reset file and folder permissions to default in Windows, you can use the icacls command. The icacls command is a command-line tool that allows you to view, modify, and reset file system permissions.

The following command will reset the file and folder permissions for the d:\docs directory and all of its subdirectories to the default inherited permissions:

icacls d:\docs /reset /t /c

What does the command do?

The icacls command has a number of switches that allow you to specify what you want to do with the permissions. The following are the switches that are used in the command above:

  • /reset: This switch tells the command to reset the permissions to the default inherited permissions.
  • /t: This switch tells the command to apply the change to all files and folders in the specified directory and its subdirectories.
  • /c: This switch tells the command to continue even if there are errors.