Resetting File Permissions in Windows Server 2008 R2

Today I needed to reset the permissions for a bunch of files in a directory on a SAS server (running Windows Server 2008 R2) so that they reverted back to the inherited permissions from the directory they were contained in (they currently had non-inherited explicit permissions for a particular user). There were too many to do by hand using point-and-click in the properties dialog so I switched to the command line.

In previous versions of Windows I had used the cacls command but I noticed in Windows Server 2008 the cacls command is deprecated and replaced with icacls. If you use the cacls command with no parameters to display the help, you will see the following message in its output:

NOTE: Cacls is now deprecated, please use Icacls.

The Microsoft TechNet site has documentation for the icacls command.

To reset an individual file’s permissions you can use:

icacls file.ext /reset

Using a wildcard to reset the permissions for a collection of files also works:

icacls *.ext /reset

Resetting the permissions on a file drops any specific/custom/explicit permissions on that file and reinstates the inherited permissions from the container/folder so that the file now only has the default inherited permissions.

2 thoughts on “Resetting File Permissions in Windows Server 2008 R2”

  1. I had a problem were some hotshot user rolledback files and somehow managed to steal file ownership from the Admin
    Long story short, icacls wasn’t working

    What I did was do takeown /R /F and then use icacls /reset /t

    With this I managed to regain control of all files

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.