Cacls.exe May Not Redirect Output to a File

Last reviewed: March 19, 1998
Article ID: Q163911
The information in this article applies to:
  • Microsoft Windows NT Workstation version 4.0
  • Microsoft Windows NT Server version 4.0

SYMPTOMS

When you use the Windows NT Cacls.exe command to redirect access control list information to a file instead of the screen, you may get unexpected results depending on the version of Cacls.exe that you are using.

MORE INFORMATION

Cacls.exe is a command-line utility that ships with all versions of Windows NT. It can display, replace, or edit, existing Access Control Lists (ACL) for files and directories on an NTFS volume. Cacls.exe is useful for resource administration and can also be helpful for troubleshooting issues related to permissions.

You can use Cacls.exe with the /t and /c switches to display ACL information.

For example, if you have a directory called c:\temp and you wanted to display the ACL for this directory, subdirectories, and its files, you could issue these commands:

   cacls c:\temp /t /c

   cacls c:\temp /t /c |more

You can also output the result to a text file with this command:

   cacls c:\temp /t /c > <filename.txt>

The expected behavior is that the information would be written to a file rather than to the screen. However, under Windows NT 4.0 Service Pack 2, the file is created, but contains only blank lines. Redirecting using the pipe (|) symbol opens Notepad with the appropriate filename, but again the file itself is empty.

RESOLUTION

To resolve this problem, do either of the followoing:

  • Use the original version of Cacls.exe from Windows NT 4.0.

-or-
  • Obtain the latest Windows NT service pack.

STATUS

Microsoft has confirmed this to be a problem in Windows NT version 4.0 Service Pack 2. The problem has been corrected in Windows NT version 4.0 Service Pack 3. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base (without spaces):

   S E R V P A C K


Additional query words: text file
Keywords : kbbug4.00.sp2 kbfix4.00.sp3 ntdomain NTSrvWkst kbnetwork
Version : WinNT:4.0
Platform : winnt
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.