-
Notifications
You must be signed in to change notification settings - Fork 822
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
WSL treating symlinks as win32 junction (redux) #4868
Comments
Setting aside "Developer Mode", it might be possible we've lost "launch wsl.exe elevated" around the time WSL2 was released to Insiders. If WSL is started (invoked while in the stopped state) from an Admin If this theory is correct, then some other elevated WSL1 functionality went down with it ( |
I'm not sure that I'm adding much to this conversation, but I just wanted to note that we are running into this when cloning a git repo inside of Ubuntu. This repo contains some symlinks, and these symlinks are not readable by the Windows side of things. This means that git on the Windows side of things gives all sorts of errors like:
In addition, there are plenty of Input/Output errors when trying to read said files from the windows side of things:
My ideal is to do 99% of my work from the Linux side of things, but use some Windows Git GUI tools to manage these Git repos, and this sort of mismatch is throwing a wrench in those plans. |
Ran into something similar while debugging intellij-rust/intellij-rust#1171. In this case, Java totally fails to read the symlink on the WSL fs. I originally thought this might just be an upstream bug in openjdk, but it appears that there is weird behavior on the Windows side: I've barely used Windows, so apologies if I misunderstand how symlinks work on the platform, but it looks to me like the file attributes correctly recognize that this is a symlink, but all the metadata is null. I imagine Java is using this and thus thinks the file doesn't exist / is unable to follow the link. |
Try these workarounds until this issue is patched.
|
my issue regarding file permissions under linux changing seems to be due to DrvFS having metadata turned off by default. 🙄 |
Is this question https://superuser.com/q/1695779/324451 the same than this bug? |
This does not work also for symlinks created on drvfs. I use WSL2 with home directory redirected to /mnt/C/Users/my_windows_user (it's slow but I need that). When I create symlink inside WSL with |
+1 |
I've had this problem since I started with WSL and thought it was just always broken. I realised that it worked for some and not for others and it's been like that for a while. So: Before doing After this small change, New-Item and ln -s both work across platforms!! Very happy :) NOTE 1: I did this with latest WSL2, a stock Ubuntu 22.04 distribution in Win10 Enterprise NOTE 2: I don't think this works when the link source and target are on different filesystems. So (sadly) you can't link from e.g. NOTE 3: It seems that I can't browse Here is what I did to get symlinks working. Edit
Edit
Create a folder
Check my
Reboot wsl using Now I don't think you can use bind mounts with |
Tried to reproduce Jay's (@the-moog) encouraging result, but no luck. Or, "not enough" luck: links created on Windows (10) work fine on the WSL side (Debian 12) [actually, I can't remember now whether they always worked...], but whatever I do in Linux (incl. copying existing ones created by Windows etc.), those links are just still incompatible with Windows. :-/ FTR:
Also, a possibly related SE/su comment:
|
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
ver
at a Windows Command Prompt)19555 WSL 2 Ubuntu-18.04
Repro from #4867 is how I noticed:
Looks like this was brought up in October 2019, but no one inc myself would notice in a long closed issue.
Regress #353 (message). They were win32 symlinks (contrast junctions) as of 17046, as long as the user possesses
SE_CREATE_SYMBOLIC_LINK_PRIVILEGE
, which (quoth) "normally requires you to launch wsl.exe elevated), unless Developer Mode is turned on."It is possible the definition of "developer mode" changed somewhere along the lines.
The syscalls succeed, natch.
The text was updated successfully, but these errors were encountered: