Folder Inheritance

From: Damon Birrell (sophdamon.nospam_at_adsl.on.net)
Date: 06/29/05


Date: Wed, 29 Jun 2005 20:48:13 +1000

Howdy

I rather urgently require a WSH VBS function to return whether or not a W2K3
NTFS folder is inheriting its permissions from a parent folder.
I have scripts that audit folders using showacls, a script that parses the
audit logs for certain groups from one domain, and a third script that uses
xcacls.vbs to assign the permissions to the corresponding groups in another
domain. This is to aid a user migration process from one domain to another
as the ADMT tool does not migrate well known groups. i.e. we have NTFS
resources with permissions assigned to DOMAIN1\Domain Users. We would like
to grant the equivalent permissions to DOMAIN2\Domain Users and I can
achieve this with my current scripts.

My problem is that the third script that calls the xcacls script is quite
dumb and doesnt take into account inheritance. As a result, the script takes
*many* hours to execute when really it just need to adjust permissions on
several of the several thousand folders and inheritance will take care of
the rest. At the moment it is attempting to adjust perms on every folder,
rather than the folders where inheritance is turned off.

I dont mind using a a third party tool like setacl or something similar
(i.e. free :-). I need a function like:

Function FolderInherits(sFolder)

    Returns True if sFolder inherits perms from its parent folder
    Returns False if sFolder does not inherit perms from its parent folder

End Function

step through the array of folders
    if not FolderInherits(sFolder)
        Perform the Xcacls stuff
    end if
next

Can anyone help? It would be greatly appreciated!

Regards
Damon



Relevant Pages

  • Re: Need help with Shared drives and permissions
    ... I believe by "default" at the root C:\ the permissions should be ... I turn on "Inheritance" at the root as I do want all the above at ... Now when I get to a sub folder where it is strictly ... traverse through that folder yet alone be able to view or see the folders. ...
    (microsoft.public.windows.server.general)
  • Re: "Recovered Files" Always in Trash
    ... What the script did was to set the permissions correctly on your invisible ... Temporary Items folder. ... Thanks for the advice and the script. ...
    (microsoft.public.mac.office.word)
  • Problem Creating HomeDirectories and Permissions using VBScript
    ... and assigning permissions to it in a VBScript script. ... it creates the setting for the folder inside the ...
    (microsoft.public.win2000.active_directory)
  • Re: How to get rid of "duration", "dimension", "quality" columns in explorer
    ... I've written a script that will apply all the view customizations you can set to all of a folder's ... You can select a folder & configure its view settings, then those are set to be inherited by all ... non-grouped view to be the default inheritance for My Computer, then return My Computer to its ...
    (microsoft.public.windowsxp.customize)
  • Re: Authenticated users permissions
    ... In NTFS when you block inheritance at a folder, ... will turn them into the initial explicit permissions on the new inheritance ... > Authenticated Users access. ...
    (microsoft.public.security)