Using the Command Line to Edit Multiple Subdirectory Permissions

This article was previously published under Q265360
This article has been archived. It is offered "as is" and will no longer be updated.
SUMMARY
This article explains how to use the command line utilities Subinacl.exe and Xcacls.exe to edit the directory permissions without replacing the existing permissions. The utilities Subinacl.exe and Xcacls.exe are included in the Windows NT Server 4.0 Resource Kit Supplement Three.
MORE INFORMATION
To change the permissions of multiple subdirectories from the command line or from a batch file, use the Subinacl.exe utility to change ownership of the subdirectories and then use the Xcacls.exe utility to change the directory permissions.

To change ownership of a directory, you can use the Subinacl.exe utility with the following syntax:

subinacl /object_type object_name /action=parameter

The following example illustrates how to use the Subinacl.exe utility to change ownership of a subdirectory:

subinacl /subdirectories c:\winnt\profiles\*.* /setowner=administrator

In this example, the parameters object_type object_name are specified by /subdirectories (the object type) and c:\winnt\profiles\*.* (the object name). Note that the command can modify multiple subdirectories (in this example, all subdirectories in the path c:\winnt\profiles). The action /setowner=administrator changes ownership of the specified subdirectories to the user account "administrator".

After you have used the Subinacl.exe utility to change ownership of the subdirectories, you can use the Xcacls.exe utility to change permissions, using the following syntax:

xcacls filename /G user: permissions /E

The following example illustrates how to use the Xcacls.exe utility to change permissions:

xcacls c:\winnt\profiles\*.* /G administrator:F /E

In this example, the target subdirectories where permissions are modified are "c:\winnt\profiles\*.*". The "/G: administrator:F" option is being used to grant the user account "administrator" full control permissions to the target subdirectories. The "/E" option is used to edit the existing access control list instead of replacing the existing permissions.


For additional information about the syntax and usage of the Subinacl.exe utility, type subinacl /help at the command line.

For additional information about the syntax and usage of the Xcacls.exe utility, refer to the Xcacls.doc file included in the Windows NT Server 4.0 Resource Kit Supplement Three.
Properties

Article ID: 265360 - Last Review: 12/05/2015 20:39:35 - Revision: 1.1

Microsoft Windows NT Server 4.0 Standard Edition

  • kbnosurvey kbarchive kbinfo KB265360
Feedback