Last active
May 31, 2020 21:52
-
-
Save aparedero/a1a37fc15b012ce62818417a08fba23c to your computer and use it in GitHub Desktop.
Vagrant Workaround: Permission denied after setting up and environment. Source: https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: # Set Variable :: | |
Set Key=".vagrant\machines\default\virtualbox\private_key" | |
:: # 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% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment