Quick Fix: Query Access Contol List entries?
April 15, 2011 Leave a comment
Querying an ACL.
Something a lot of us will have had to do on a number of occasions, when it is for one folder it is a fairly straight foward task. But imagine a scenario where you have to check multiple folders, and possible compare the results, it can be time consuming not to mention BORING!
So this was a task i had to perform this morning. A client running DFS where due to saturated WAN links their dfs had huge backlogs. Having resolved these issues using a variety of tools and tecniques (beyond the scope of this) i wanted to run a few quick checks to make sure permissions were applied accuratley accross sites.
Enter – Accesschk
A very handy Sysinternals tool that you can run to query an ACL from a folder, file or whatever you like.
Download the file and extract it to your desktop.
Open up a command prompt from the accesschk folder (right click and hold shift to get ‘open command prompt here’)
Type in your command, so i want to test this on c:\users so the syntax is…
accesschk c:\users <enter>
And you receive your output.
Not so easy to work with this output, so you might want to output to a txt file.
Simply add the usual ‘batch file output’ syntax ‘ > ‘ so our command becomes..
accesschk c:\users >accesschk.txt
No output displayed now, so we need to open out txt file to view the results.
As you can see the output here is much easier to view, and control.
You will need permission to actually view the ACL or your output may not be as expected.
As you can see from the output in the txt file my query couldnt get the ACL info from two of the folders. If i try to access these folders through explorer, you can see why..
This tool really saved me a lot of time, hopefully you will find it useful!