Backup Permissions For Files and Folders in Windows 10

NTFS is the standard file system of the Windows NT operating system family. Starting with Windows NT 4.0 Service Pack 6, it supported the concept of permissions which can be configured to permit or restrict access to files, folders, and other objects locally and over a network. Once you have configured permissions for a file or a folder, you may want to create a backup of them in order to restore them later or before you change them again.

As a user accesses each file, folder, registry key, printer, or an Active Directory object, the system checks its permissions. It supports inheritance for an object, e.g. files can inherit permissions from their parent folder. Also every object has an Owner which is the user account that can set ownership and change permissions.

If you are interested in managing NTFS permissions, refer to the following article:

How to take ownership and get full access to files and folders in Windows 10

For our task, we will use icacls.exe, the built-in console tool. It displays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories.

Before proceeding, ensure that your user account has administrative privileges. Now, follow the instructions below.

To backup permissions in Windows 10, do the following.

  1. Open an elevated command prompt.
  2. Type or copy-paste the following command:
    icacls "Path \ to \ file or folder" /save "C:\data\Permissions.txt"

    Provide the path to your file or folder you want to backup the permissions for. Substitute the "C:\data\Permissions.txt" file path with the desired file name and path that is suitable for your computer.

  3. The next command will backup the permissions for the specified folder, it subfolders and all files.
    icacls "Path \ to \ folder" /save "C:\data\permissions.txt" /t /c

Windows 10 Backup Permissions

The switches in the command are as follows:
/t - Performs the operation on all specified files in the current directory and its subdirectories.
/c - Continues the operation despite any file errors. Error messages will still be displayed.

The file​ permissions.txt is the permissions backup of your file or folder. Keep it in some safe place.Windows 10 Permissions Text File

Now, let's see how to restore the permissions from the backup you made.

Restore File System Permissions in Windows 10

  1. Open an elevated command prompt.
  2. To restore the permissions for a file, type or copy-paste the following command:
    icacls "Path \ to \ file" /restore "C:\data\permissions.txt"

    Provide the path to your file you want to restore the permissions for. Substitute the "C:\data\Permissions.txt" portion with the actual file path which stores your permissions.

  3. To restore the permissions for a folder, type or copy-paste the following command:
    icacls "Path \ to \ parent \ folder" /restore "C:\data\permissions.txt"

    Substitute the "Path \ to \ parent \ folder" with the path to the parent folder that contains the folder you want to restore the permissions for. For example, if you target folder is 'c:\data\winaero', you should specify the path 'C:\data'.

Windows 10 Restore Permissions
That's it.

Related articles:

1 thought on “Backup Permissions For Files and Folders in Windows 10

  1. Bob

    This icacls should have a full GUI in Windows!!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *