Documenting NTFS Permissions

Recently, I was asked to get a “snapshot” of the NTFS permissions on a Windows Server 2003, File and Print server. My boss simply wanted screen shots of everything, and I knew that would be rather useless. I wanted to have a file that could be used to actually enter the information into the system, if I ever had to rebuild this machine. After about 20 minutes of, “Right Click”, “Security” and copying down the permissions, I thought to myself, “There is no way in crap I’m going to do this on this entire directory tree.”

So, I was off to visit my good friend “Command Line” to see if I could get it to tell me what I wanted to know. After about half an hour of playing, I finally got what I wanted.

I found the command “cacls” which is a new one to me. You can use it to display the NTFS permissions on an object.

In my case, I wanted to show all the permissions, for every directory in a rather large tree, and dump the info into a text file. well, it’s as simple as:

cacls * > filename.txt

Viola! Enjoy.

Tags: , , , , , ,