fixed acl issue
This commit is contained in:
parent
eeb8abbd45
commit
85eeec864c
@ -65,15 +65,16 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
|
||||
$rid = $ReadTarget.Name
|
||||
$wid = $WriteTarget.Name
|
||||
$rid = $ReadTarget.SID
|
||||
$wid = $WriteTarget.SID
|
||||
$fsrr = "ReadAndExecute"
|
||||
$fsrw = "Write"
|
||||
$type = "Allow"
|
||||
|
||||
$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)
|
||||
|
||||
$fileSystemAccessRuleR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid.Name,$fsrr,"ContainerInherit, ObjectInherit","None",$type)
|
||||
$fileSystemAccessRuleW = New-Object System.Security.AccessControl.FileSystemAccessRule($wid.Name,$fsrw,"ContainerInherit, ObjectInherit","None",$type)
|
||||
$fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($wid.Name,$fsrr,"ContainerInherit, ObjectInherit","None",$type)
|
||||
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleR)
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleW)
|
||||
|
Loading…
Reference in New Issue
Block a user