ginger8990 Posted October 3, 2013 Posted October 3, 2013 Is a script around to list network share permissions ? This script can add permissions to a folder but not add permissions to the sub folder: Anyone know how to teak it to set permissions to the folder and sub folders and files. Option Explicit Dim strHomeFolder, strHome, strUser Dim intRunError, objShell, objFSO strHomeFolder = "\\grand\home\user" Set objShell = CreateObject("Wscript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(strHomeFolder) Then ' Assign user permission to home folder. intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " _ & strHomeFolder & " /e /c /g Administrators:F ", 2, True) If intRunError <> 0 Then Wscript.Echo "Error assigning permissions for user " _ & strUser & " to home folder " & strHomeFolder End If End If WScript.Quit
Steve21 Posted October 3, 2013 Posted October 3, 2013 Add /T sorted Cacls - Modify Access Control List | SS64.com /T Search the pathname including all subfolders. Example: Give the Finance group Full Control of a folder and all sub folders CACLS c:\docs\work /E /T /C /G "FinanceUsers":F Steve 1
Arthur Posted October 3, 2013 Posted October 3, 2013 It's also worth mentioning that you should be using icacls instead of cacls.
ginger8990 Posted October 3, 2013 Author Posted October 3, 2013 Can you send me scripts forum link? icalcls and calcls can be used to add multiple groups to tons of network share folders ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now