feat(lst): script added for the test server to readd the permissions once it boots up
This commit is contained in:
22
server/scripts/updatePermissions.ps1
Normal file
22
server/scripts/updatePermissions.ps1
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Define the array of folders
|
||||||
|
$folders = @(
|
||||||
|
"AlplaBasis",
|
||||||
|
"AlplaBudget",
|
||||||
|
"AlplaINVOICE",
|
||||||
|
"AlplaLabel",
|
||||||
|
"AlplaOrder",
|
||||||
|
"AlplaPlanning",
|
||||||
|
"AlplaPurchase",
|
||||||
|
"AlplaStock",
|
||||||
|
"PDF24",
|
||||||
|
"Module shortcuts"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Set permissions using icacls
|
||||||
|
$permissions = "Everyone:(OI)(CI)F"
|
||||||
|
|
||||||
|
# Loop through each folder and set permissions
|
||||||
|
foreach ($folder in $folders) {
|
||||||
|
$folderPath = "C:\Sources\AlplaPROD\$folder"
|
||||||
|
icacls $folderPath /grant $permissions /t /c /q
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user