Automatic Folder Share Permissions Based On Folder Name?

jsmock

New member
Joined
Jul 26, 2011
Messages
2
Location
Tampa, Florida
Is there a way to automatically configure folder share permissions based on the name of a folder? Say for example a user creates a folder (anywhere on the server) named "Quotes". I would like that folder to automatically belong to the Quoting Group and exclude access by anyone not in the Quoting Group, even if the user that created the folder is not a member of the Quoting group.

We have a database application that creates and manages a large number of folders. It creates thousands of numbered folder "sets", each numbered folder having a standard set of sub-folders like Sales, Purchase Orders, etc. We need to control access to the sub-folders based on Group membership. Any user of the database might trigger the creation of a new set of folders. The database application must be able to create a complete set of folders regardless of which user is logged on and then (hopefully) apply security to the new folders based on folder name.

I suppose I could do this through a Windows PowerShell script, perhaps run every evening (which would be acceptable) but is there a better (easier) way through Group Policy or some other method?

thanks
 
Hi,

No, you can only use Power Shell or VBS to accomplish this task.

You can retrieve the group of the user, and then use it to set permissions.
 
Thanks for the quick reply. I'm an experienced programmer but just learning Windows PowerShell. Can you by chance point me to any examples of how to loop through all the folders on a server? greatly appreciated.
 
Using the built in commands... you can do something like this:

Code:
$dirs = get-ChildItem -Recurse | where {$_.psIsContainer -eq $true}
$dirs | select fullname
 
Back
Top