changed write over to modify
This commit is contained in:
parent
e1458836ce
commit
bcf3b89e50
@ -70,7 +70,7 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
$rid = $ReadTarget.SID
|
||||
$wid = $WriteTarget.SID
|
||||
$fsrr = "ReadAndExecute"
|
||||
$fsrw = "Write"
|
||||
$fsrw = "Modify"
|
||||
$fsrad = "CreateDirectories"
|
||||
$fsraf = "CreateFiles "
|
||||
$type = "Allow"
|
||||
@ -78,9 +78,6 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
|
||||
$fileSystemAccessRuleR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid,$fsrr,"ContainerInherit, ObjectInherit","None",$type)
|
||||
$fileSystemAccessRuleW = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrw,"ContainerInherit, ObjectInherit","None",$type)
|
||||
$fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrr,"ContainerInherit, ObjectInherit","None",$type)
|
||||
$fileSystemAccessRuleWAF = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsraf,"ContainerInherit, ObjectInherit","Synchronize",$type)
|
||||
$fileSystemAccessRuleWAD = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrad,"ContainerInherit, ObjectInherit","Synchronize",$type)
|
||||
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleR)
|
||||
@ -88,15 +85,6 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleW)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleWR)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleWAF)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleWAD)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user