fixed acl issue
This commit is contained in:
parent
ddaa5a3305
commit
eeb8abbd45
@ -67,16 +67,13 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
|
||||
$rid = $ReadTarget.Name
|
||||
$wid = $WriteTarget.Name
|
||||
$fsrr = "Read"
|
||||
$fsrr = "Write"
|
||||
$fsrr = "ReadAndExecute"
|
||||
$fsrw = "Write"
|
||||
$type = "Allow"
|
||||
$fsarar = @($rid,$fsrr,,,$type)
|
||||
$fsaraw = @($wid,$fsrw,,,$type)
|
||||
$fsarawr = @($wid,$fsrr,,,$type)
|
||||
|
||||
$fileSystemAccessRuleR = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fsarar
|
||||
$fileSystemAccessRuleW = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fsaraw
|
||||
$fileSystemAccessRuleWR = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fsarawr
|
||||
$fileSystemAccessRuleR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid,$fsrr,"ContainerInherit, ObjectInherit",,$type)
|
||||
$fileSystemAccessRuleW = New-Object System.Security.AccessControl.FileSystemAccessRule($Wid,$fsrw,"ContainerInherit, ObjectInherit",,$type)
|
||||
$fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid,$fsrr,"ContainerInherit, ObjectInherit",,$type)
|
||||
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleR)
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleW)
|
||||
|
Loading…
Reference in New Issue
Block a user