-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate Symbolic/Hard link permission issues on Windows #1574
Comments
Looking at how Scoop (https://scoop.sh) does this I see this code in their scripts: function Get-WindowsDeveloperModeStatus {
$DevModRegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
if (!(Test-Path -Path $DevModRegistryPath) -or (Get-ItemProperty -Path `
$DevModRegistryPath -Name AllowDevelopmentWithoutDevLicense -ErrorAction `
SilentlyContinue).AllowDevelopmentWithoutDevLicense -ne 1) {
warn "Windows Developer Mode is not enabled. Operations relevant to symlinks may fail without proper rights."
Write-Host " You may read more about the symlinks support here:"
Write-Host " https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/"
return $false
}
} They link to this article: https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/ Which explains that the creation of links without admin rights is something that was added to Windows 10, but for that you need to switch to "Developer Mode". We could at least add a similar warning to our |
And searching for issues with Java and sym/hard links on Windows I found this: https://bugs.openjdk.org/browse/JDK-8218418 Which makes internal changes to Java allowing it to create sym/hard links without needing elevated privileges. |
Tested if what I found was true and it seems indeed that from Java 13 onwards there is no issue with permissions and Jbang can create Symbolic Links with no issue. Older version fail if one doesn't use the Windows Policy Editor to give specific users the rights to create Symbolic Links. Btw, creating Hard Links was never a problem.... but on Windows you can't create Hard Links to folders! So my idea is now to:
|
Setting up WIndows to be able to use symbolic and hard links can be somewhat of a challenge.
We should be able to give the user straightforward instruction on what to do.
Right now our documentation is sorely lacking in that aspect.
The text was updated successfully, but these errors were encountered: