Skip to content
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

Windows mount of WSL2 volume does not support soft links #5308

Closed
SeanP opened this issue May 31, 2020 · 2 comments
Closed

Windows mount of WSL2 volume does not support soft links #5308

SeanP opened this issue May 31, 2020 · 2 comments

Comments

@SeanP
Copy link

SeanP commented May 31, 2020

Please fill out the below information:

  • Your Windows build number: Microsoft Windows [Version 10.0.19041.264]

What you're doing and what's happening:

  • Confirm Linux install is using WSL2:
PS > wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-20.04    Running         2
  • Open Ubuntu 20.04: PS > ubuntu2004.exe
  • In Ubuntu, make a directory and a soft link to that directory:
➜  ~ mkdir workspace
➜  ~ ln -s workspace ws
  • Confirm the directory and soft link were created successfully:
➜  ~ ls -la
...
drwxr-xr-x  2 <user> <user>  4096 May 31 13:46 workspace
lrwxrwxrwx  1 <user> <user>     9 May 31 13:46 ws -> workspace
  • In Windows Explorer, navigate to the directory to view the soft link: \\wsl$\Ubuntu-20.04\home\<user>
  • In Windows Explorer, double-click ws to browse the workspace directory.

What's wrong / what should be happening instead:

  • ws is shown as a File, and does not operate as a soft link to the workspace directory.
  • This behavior can also be seen in PS ls (note L: is a mount of \\wsl$\Ubuntu-20.04\):
PS L:\home\<user>> ls w*
    Directory: L:\home\<user>
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         5/31/2020     13:46                workspace
-----l         5/31/2020     13:46              9 ws

Notes

Similar behavior is exhibited for soft links to files:

➜  ~ echo "Hello, world" > README.md
➜  ~ ln -s README.md ALSOREADME.md
➜  ~ ll
total 8.0K
lrwxrwxrwx 1 <user> <user>    9 May 31 14:04 ALSOREADME.md -> README.md
-rw-r--r-- 1 <user> <user>   13 May 31 14:04 README.md
drwxr-xr-x 2 <user> <user> 4.0K May 31 13:46 workspace
lrwxrwxrwx 1 <user> <user>    9 May 31 13:46 ws -> workspace
➜  ~ cat README.md ALSOREADME.md
Hello, world
Hello, world
PS L:\home\<user>> cat .\README.md
Hello, world
PS L:\home\<user>> cat .\ALSOREADME.md
cat : The name of the file cannot be resolved by the system.
At line:1 char:1
+ cat .\ALSOREADME.md
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (L:\home\<user>\ALSOREADME.md:String) [Get-Content], IOException
    + FullyQualifiedErrorId : GetContentReaderIOError,Microsoft.PowerShell.Commands.GetContentCommand

@therealkenc
Copy link
Collaborator

/dupe #4868

@ghost
Copy link

ghost commented May 31, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants