📜  pem 文件太开放 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:51.987000             🧑  作者: Mango

代码示例2
:: # Set Variable:
   Cmd /c Set Key="C:\Path\to\keyfile"

:: # Remove Inheritance:
   Cmd /c Icacls %Key% /c /t /Inheritance:d

:: # Set Ownership to Owner:
   Cmd /c Icacls %Key% /c /t /Grant %UserName%:F

:: # Remove All Users, except for Owner:
   Cmd /c Icacls %Key% /c /t /Remove Administrator "Authenticated Users" BUILTIN\Administrators BUILTIN Everyone System Users

:: # Verify:
   Cmd /c Icacls %Key%