Skip to content

Commit cac450d

Browse files
committed
Revert "try icacls with L flag"
This reverts commit 686e76f.
1 parent e6138d6 commit cac450d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/BOSH.Agent/BOSH.Agent.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function Copy-Agent
6868
Move-Item (Join-Path $boshDir (Join-Path "deps" "*")) $depsDir
6969
Remove-Item -Path (Join-Path $boshDir "deps") -Force
7070

71-
New-Item -Path (Join-Path $depsDir "tar.exe") -ItemType SymbolicLink -V "C:\Windows\system32\tar.exe"
71+
Copy-Item "C:\Windows\system32\tar.exe" -Destination (Join-Path $depsDir "tar.exe")
7272
}
7373

7474

modules/BOSH.Utils/BOSH.Utils.psm1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,21 @@ function Protect-Dir
101101
)
102102

103103
Write-Log "Protect-Dir: Grant Administrator"
104-
cmd.exe /c icacls.exe $path /T /L /inheritancelevel:e /grant:r Administrators:F
104+
cmd.exe /c cacls.exe $path /T /E /P Administrators:F
105105
if ($LASTEXITCODE -ne 0)
106106
{
107107
Throw "Error setting ACL for $path exited with $LASTEXITCODE"
108108
}
109109

110110
Write-Log "Protect-Dir: Remove BUILTIN\Users"
111-
cmd.exe /c icacls.exe $path /T /L /inheritancelevel:r /remove:g "BUILTIN\Users"
111+
cmd.exe /c cacls.exe $path /T /E /R "BUILTIN\Users"
112112
if ($LASTEXITCODE -ne 0)
113113
{
114114
Throw "Error setting ACL for $path exited with $LASTEXITCODE"
115115
}
116116

117117
Write-Log "Protect-Dir: Remove BUILTIN\IIS_IUSRS"
118-
cmd.exe /c icacls.exe $path /T /L /inheritancelevel:r /remove:g "BUILTIN\IIS_IUSRS"
118+
cmd.exe /c cacls.exe $path /T /E /R "BUILTIN\IIS_IUSRS"
119119
if ($LASTEXITCODE -ne 0)
120120
{
121121
Throw "Error setting ACL for $path exited with $LASTEXITCODE"
@@ -138,21 +138,21 @@ function Protect-Path
138138
)
139139

140140
Write-Log "Protect-Path: Grant Administrator"
141-
cmd.exe /c icacls.exe $path /L /grant:r Administrators:F
141+
cmd.exe /c cacls.exe $path /E /P Administrators:F
142142
if ($LASTEXITCODE -ne 0)
143143
{
144144
Throw "Error setting ACL for $path exited with $LASTEXITCODE"
145145
}
146146

147147
Write-Log "Protect-Path: Remove BUILTIN\Users"
148-
cmd.exe /c cacls.exe $path /L /remove:g "BUILTIN\Users"
148+
cmd.exe /c cacls.exe $path /E /R "BUILTIN\Users"
149149
if ($LASTEXITCODE -ne 0)
150150
{
151151
Throw "Error setting ACL for $path exited with $LASTEXITCODE"
152152
}
153153

154154
Write-Log "Protect-Path: Remove BUILTIN\IIS_IUSRS"
155-
cmd.exe /c cacls.exe $path /L /remove:g "BUILTIN\IIS_IUSRS"
155+
cmd.exe /c cacls.exe $path /E /R "BUILTIN\IIS_IUSRS"
156156
if ($LASTEXITCODE -ne 0)
157157
{
158158
Throw "Error setting ACL for $path exited with $LASTEXITCODE"

0 commit comments

Comments
 (0)