Jump to content

Recommended Posts

Posted

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

Posted

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.

--------------------------------------------------------

Tu peux aussi crire en franais.

Du kannst auch auf Deutsch schreiben.

Puoi scrivere anche in italiano.

--------------------------------------------------------

Posted
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.
Posted

Using the built in commands... you can do something like this:

 

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

--------------------------------------------------------

Tu peux aussi crire en franais.

Du kannst auch auf Deutsch schreiben.

Puoi scrivere anche in italiano.

--------------------------------------------------------

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...