verify folder permission integrity based on model folder

R

Ryan Rupert

Is it possible using scripting technologies and command line
NTFS permissions utilities to perform the following operation?
I want to verify that permissions on folders (all with the same
name) throughout a large directory tree are the same as permissions
on a model/template folder.

ENVIRONMENT
I have a large directory tree that is based on a "template folder".
As needed I XCOPY.EXE (with permissions retention options) this
template folder to other folders deeper in the folder tree.
What I want to script is the ability to verify that all folders
that are based on this template have the same permissions as
this template. This is made easier by the fact that sub-folders
of the template folder never change name, the only name change
is on the template folder root, but I don't really need to verify
permissions on folders based on the template root.

ILLUSTRATION
TEMPLATE FOLDER
c:\template folder\folder\
c:\template folder\folder\folder 1\
c:\template folder\folder\folder 2\

FOLDER TREE
C:\A\template folder copy 1\folder\
C:\A\template folder copy 1\folder\folder 1\
C:\A\template folder copy 1\folder\folder 2\
C:\A\template folder copy 2\
C:\A\template folder copy 2\folder\folder 1\
C:\A\template folder copy 2\folder\folder 2\

GOAL
Again, what I want to do is compare the template
folder "folder 1" permissions with the permissions
of deeper nested "folder 1" folders. When the script
recognized a difference, that is the condition I want
reported.
 
B

Bill Stewart

Ryan Rupert said:
Is it possible using scripting technologies and command line NTFS
permissions utilities to perform the following operation? I want to
verify that permissions on folders (all with the same name) throughout a
large directory tree are the same as permissions on a model/template
folder.

One possibility might be to use DumpSec (www.somarsoft.com) to output
permissions for both directories and use a diff tool to highlight the
differences...

Regards,

Bill
 
D

David Wang [Msft]

Use CACLS.EXE (available in System32 directory since Windows 2000) to
recursively report the ACLs of files/folders, starting from a directory
root, and then WINDIFF the copy to the template.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
Is it possible using scripting technologies and command line
NTFS permissions utilities to perform the following operation?
I want to verify that permissions on folders (all with the same
name) throughout a large directory tree are the same as permissions
on a model/template folder.

ENVIRONMENT
I have a large directory tree that is based on a "template folder".
As needed I XCOPY.EXE (with permissions retention options) this
template folder to other folders deeper in the folder tree.
What I want to script is the ability to verify that all folders
that are based on this template have the same permissions as
this template. This is made easier by the fact that sub-folders
of the template folder never change name, the only name change
is on the template folder root, but I don't really need to verify
permissions on folders based on the template root.

ILLUSTRATION
TEMPLATE FOLDER
c:\template folder\folder\
c:\template folder\folder\folder 1\
c:\template folder\folder\folder 2\

FOLDER TREE
C:\A\template folder copy 1\folder\
C:\A\template folder copy 1\folder\folder 1\
C:\A\template folder copy 1\folder\folder 2\
C:\A\template folder copy 2\
C:\A\template folder copy 2\folder\folder 1\
C:\A\template folder copy 2\folder\folder 2\

GOAL
Again, what I want to do is compare the template
folder "folder 1" permissions with the permissions
of deeper nested "folder 1" folders. When the script
recognized a difference, that is the condition I want
reported.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top