Ensure error file can be read from
This commit is contained in:
parent
f136ad35ea
commit
c68b153401
2 changed files with 8 additions and 1 deletions
|
@ -135,6 +135,7 @@ $null = New-Module {
|
|||
}
|
||||
catch {
|
||||
Set-Content -Path $errorPath -Value $Error;
|
||||
Set-UserPermissions $errorPath;
|
||||
}
|
||||
finally {
|
||||
Set-Stage ([SetupStage]::Idle);
|
||||
|
|
|
@ -55,7 +55,13 @@ $null = New-Module {
|
|||
[FileSystemAccessRule]::new(
|
||||
[SecurityIdentifier]::new([WellKnownSidType]::BuiltinUsersSid, $null),
|
||||
[FileSystemRights]::FullControl,
|
||||
[InheritanceFlags]::ObjectInherit -bor [InheritanceFlags]::ContainerInherit,
|
||||
(& {
|
||||
if (Test-Path -PathType Container $Path) {
|
||||
[InheritanceFlags]::ObjectInherit -bor [InheritanceFlags]::ContainerInherit
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}),
|
||||
[PropagationFlags]::InheritOnly,
|
||||
[AccessControlType]::Allow));
|
||||
|
||||
|
|
Loading…
Reference in a new issue