The “icacls /T /C” command does not set the access permissions for the files and for the subfolders in Windows Server 2003, in Windows Vista, or in Windows Server 2008 if the inheritance flag is removed from the folder
Consider the following scenario:
- You have a computer that is running Windows Server 2003, Windows Vista, or Windows Server 2008.
- You use the Icacls.exe command prompt utility to manage the access permissions of a folder on this computer.
- You do not have permission to access the folder, the files in the folder, and the subfolders.
- You remove the inheritance flag of the folder.
- You use the /T switch to make sure that the changed permission is applied to the folder, to all the files in the folder, and to all the subfolders. Additionally, you use the /C switch to make sure that the operation continues if any file errors occur.
In this scenario, the access permission is applied to the folder. However, the access permission is not applied to all the files in the folder, and to all the subfolders. Additionally, the command returns error code 5. However, the command reports that the number of failed processes is 0.
For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB2028627.