NTFS Stuff v1 – Eng
VBS WSH Script
Authors: Mirko Iodice, Luca Alberti
Tested on: Windows 2000 Server, Windows 2003 Server, Windows XP Professional, Internet Explorer 6, Internet Explorer 7, Internet Explorer 8, Mozilla Firefox 3.X
What is NTFS Stuff?
It is hard for a Microsoft System Administrator to keep trace of all changes made to the “logical” structure of a fileserver, so many times we felt the need for a quick and easy tool that could help us to locate those “significant” folders that, in some way, affect the normal application of NTFS permissions based on the “inheritance” principle.
NTFS Stuff is an useful WSH script, written to be used on a fileserver, that generates an HTML report which displays the NTFS access permissions structure. Two different “verbosity” levels make possible to display only the details of “significant” folders or those of the entire folders tree. In addition to the DACL of each single folder the resultant report shows other information, such as: creation date, last modified date, owner, NTFS inheritance.
We have paid particular attention to the graphical representation of information, colours and symbols make easier to note changes in the normal application of NTFS permissions, precisely based, as we said before, on the “inheritance” principle.
The following screenshot highlights the main features of this script
- The details of each folder are hidden by default, it is possible to display them by clicking on their names; these details include: full path, creation date, last modified date, owner, DACL (both Allow and Deny options).
- “Expand All” and “Collapse All” links allow to display or hide all the details with a single mouse click.
- Inheritance state is highlighted by colourful symbols.
A green “=” means that permissions are inherited and not modified; folders identified by this symbol are not significant.
More important are instead “x” and “+” symbols, respectively red and blue. A red “x” means infact that inheritance is turned off, while a blue “+” means that there are some differences between the permissions of the folder and those of its parents (inheritance is turned on anyway). - To make the output more readable, the details section of folders identified by “x” and “+” symbols displays also the parent folder’s permissions.
- There is the chance to set two different execution methods: with “verbosity = 0″ (default) only the folders identified by symbols “x” and “+” are displayed; with “verbosity = 1″ the complete folders structure is displayed, graphically represented with the use of indentation.
- To offer more control is possible to specify the number of sub-levels (recursion) that have to be analyzed starting from the root folder; this feature can also reduce the execution time.
Recommendations
NTFS Stuff, only when started on Windows 2000, prompts the user for a task priority level (1 by default). This setting is used to limit the cpu usage during the execution. It is recommended to not set the 0 level when using this script on production servers or old computers, this is because the WSH Engine normally uses the most of the machine resources and this setting could cause a system freeze. Windows XP/2003 or higher are not affected by this problem, on these systems the script is able to automatically change his task priority level to “low”, in this way the resource allocation is left to the operating system.
We noticed that is impossibile to correctly view the output file on Windows Server 2003 systems with the “Internet Explorer Enhanced Security” feature turned on. To fix this problem is necessary to add about:internet in the IE Trusted Sites Zone.
DACL Legend
NTFS Stuff uses functions took from XCACLS.VBS (Windows Support Tools) to display the NTFS permissions in a more readable format.
To understand special permissions refer to the following legenda.
General:
F = Full control
M = Modify
X = read & eXecute
R = Read
W = Write
Advanced:
E = Synchronize
D = Take Ownership
C = Change Permissions
B = Read Permissions
A = Delete
9 = Write Attributes
8 = Read Attributes
7 = Delete Subfolders and Files
6 = Traverse Folder / Execute File
5 = Write Extended Attributes
4 = Read Extended Attributes
3 = Create Folders / Append Data
2 = Create Files / Write Data
1 = List Folder / Read Data
Known Issues
Folders created by macintosh systems, especially those named with the use of special characters, can cause an unexpected error.
Download
Changelog
- ntfs Stuff v1.0 – initial release
- ntfs Stuff v1.1 – fixed a CSS bug on Internet Explorer 8 and Firefox 3.5, new function added for better performance on Windows XP/2003 or higher
References
- http://www.microsoft.com/te….c=it
- http://msdn2.microsoft.com/en….85).aspx
- http://msdn2.microsoft.com/en….85).aspx
- http://msdn2.microsoft.com/en….85).aspx
- http://www.microsoft.com/te….007.mspx
- http://kbalertz.com/88386….ervice.aspx
Author
Mirko Iodice
mirko -at- notageek (.dot) it
Suggeriti dall'autore
- Mettere ordine alle autorizzazioni di un File Server utilizzando NTFS Stuff v1
- WSH - Windows Scripting Host
Contenuti correlati
- NTFS Stuff v1 – Ita
- Mettere ordine alle autorizzazioni di un File Server utilizzando NTFS Stuff v1
- Corso – Windows XP in Active Directory
- Corso – Introduzione alla rete Windows in dominio Active Directory – Ottobre 2009
- Corso – Fondamenti di Microsoft Windows Server 2003

This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
Print This • Email this • Twit This! • Add to del.icio.us • Share on Facebook • Digg This! • Stumble It! • AddThis! • Share on Segnalo Alice • Share on OKNotizie

22 gennaio 2009 alle 11:48
niiiiiiiiice … this is exactly the idea i had … great tool!
tip: it would be nice if you couldd specify an option to resolve ad groups to user names; when i click on a group, i’d like to se a (recursive) box within the permission box with the members of the specified group
23 gennaio 2009 alle 8:33
@Milan
Thanks for your feedback, is really appreciated.
Due to the low amount of feedbacks we are not planning to release an improved version of this script but if we will, I think that we can easily add this functionality of resolving group membership.
28 gennaio 2009 alle 17:44
Firstly, I would like to thank you for creating this script and to say this is a wonderful script. Could you please update it to support Cyrillic text? I have a folder structure with folder names in English and Russian (Cyrillic) and the script errors with the following error. I have no scripting knowledge and therefore have no idea how to fix it. Could you please help?
Script: C:\ntfsStuff.vbs
Line: 439
Char: 5
Error: Invalid procedure call or argument
Code: 800A0005
Source: Microsoft VBScript runtime error
30 gennaio 2009 alle 8:56
In the next few days we will try to develop a patch/fix to support cyrillic text. honestly I don’t even know how to write this kind of characters but… I will give it a try ;-)
2 febbraio 2009 alle 22:52
@ Oscar Lewis
at line 144 of ntfsStuff.vbs change
“Set ObjLog = ObjFSO.CreateTextFile(logfile, ForWriting)”
with
“Set ObjLog = ObjFSO.CreateTextFile(logfile, ForWriting, 1)”
without quotes, obviously.
I think that this simple fix could solve your problem, please let me know if it’s ok.
3 febbraio 2009 alle 11:12
Thanks a lot, it is running now and it looks like it works perfectly.
4 marzo 2009 alle 13:08
Thanks for the script – it is really helpful.
One more to the wish list – it would be great to have export to csv files, for axample, ore raw per permission (so for every folder may be several records): path,folder level, ACL name, permission,inheritance flag). This could help with automation.
5 marzo 2009 alle 23:45
@ Sergio
Thank you, we really appreciate the positive feedbacks and suggestions. Regarding the “export to csv” feature… don’t get me wrong on this but I don’t support this idea simply because my opinion is that the purpose of this tool is not only to list folder’s permissions. It was made with the idea of highlighting in a visual way the role played by these permissions inside the entire folder’s structure.
20 aprile 2009 alle 17:50
It would have been really nice to export to a CSV AND resolve usernames from groups – this would save me months being a REAL novice and scripting :)
11 ottobre 2009 alle 11:13
Its really one of the best tools i have seen.
Thank You!
11 ottobre 2009 alle 23:12
@ Ashish Grover
Thanks for your feedback :)
13 ottobre 2009 alle 20:53
Released a small update, details are in the changelog section.
22 gennaio 2010 alle 17:52
Love the script. Is there a way to call a remote server and directory to report on?
22 gennaio 2010 alle 22:34
@ Brad
Sorry but the script only works on the local machine, not on shared folders.
Anyway… it might be possible to modify it so that it can be uploaded and executed on a remote server using the psexec tool.