Skip to content

Unify lxss symlinks and win32 symlinks on driveFS? #1475

Closed

Description

@fpqc

The new builds have unprivileged symlinks available for us to play with in win32. WSL also does symlinking on DriveFS. However, when I made a DriveFS to DriveFS symlink from inside of WSL, this symlink appeared as a weird kind of file in Win32. (running dir in cmd said it was of type junction [...], although it appears to be an invalid junction, since it was not traversable in Windows Explorer or cmd).

It seems like a natural idea to have DriveFS-to-DriveFS symlinks created as actual NTFS symlinks now that they can be made without administrative privileges. Also of note: Trying to traverse a Win32 symlink inside of WSL produces the error:

Input/output error

Also, for obvious reasons, driveFS symlinks to VolFS/LXFS should maybe remain as they are (to avoid all of the weird and broken things that could happen), and VolFS-to-VolFS or VolFS-to-DriveFS symlinks are already a completely different format (they appear to be textfiles with special attributes if opened from a Win32 text editor).

Activity

  1. aseering commented on Dec 8, 2016

    @aseering
    Contributor

    This sounds like #559 ?

    For what it's worth, I would like this feature, and I have heard from others who would also like this feature.

  2. fpqc commented on Dec 8, 2016

    @fpqc
    Author

    Adam Seering (@aseering) This is the first build that enables unprivileged creation of symlinks (when in developer mode).

  3. aseering commented on Dec 8, 2016

    @aseering
    Contributor

    By "this build", do you mean r14986? Then it sounds like it's a good time to restart the discussion :-)

  4. fpqc commented on Dec 8, 2016

    @fpqc
    Author

    Adam Seering (@aseering) Yup. Technically it was announced last week for the cancelled insider build 14972 (because of the switch to the new UUP updater).

    https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#6rqVGez52fmdys8Q.97

  5. benhillis commented on Dec 8, 2016

    @benhillis
    Member

    We've spoken about this internally and I agree it would be a nice feature to have. I'll check with the team about the current plan.

  6. fpqc commented on Dec 8, 2016

    @fpqc
    Author

    Ben Hillis (@benhillis) Also, by the way, if we try to traverse a Win32 symlink with WSL in DriveFS, we get the error:

    Input/Output error

    If I remember correctly, in the old pre-anniversary edition days, these kinds of symlinks were traversable. Also, the Win32 symlinks on DriveFS do not appear to even be visible with ls on drivefs

  7. vyv03354 commented on Dec 9, 2016

    @vyv03354

    Although unprivileged create requires the developer mode, it does not matter to WSL because WSL also requires the developer mode anyway.

  8. fpqc commented on Dec 9, 2016

    @fpqc
    Author

    @vy03354 yup!

  9. 0xabu commented on Dec 16, 2016

    @0xabu

    This would also help with Cygwin interop. Right now, there's no common symlink format understood by both Cygwin and WSL, which makes switching between Cygwin and WSL a painful all-or-nothing affair. Cygwin already has read support for NTFS symlinks.

  10. fpqc commented on Dec 16, 2016

    @fpqc
    Author

    Hey 0xabu. I spoke to the msys2 irc channel and they're going upstream to have it changed there as well to use native symlinks on 14986 in dev mode.

  11. ayalon commented on Jan 18, 2017

    @ayalon

    From the point of a web developer, the cross use of symlinks is one of the most important missing features of WSL. I'm constantly testing WSL and for now, this missing features is the only left blocker to completely switch from OSX to Windows 10. Maybe the performance of the mounted file system is also annoying, but it's not a show stopper.

    Anykind of improvments so that symlinks are seen / shared between the two filesystem would be so much appreciated.

  12. DannyT commented on Feb 8, 2017

    @DannyT

    What ayalon said. We utilise grunt/gulp for various frontend dev setup/build processes which all works flawlessly in WSL with the exception of symlinks that are created. Windows not being able to follow symlinks created in WSL is the only show-stopper for our company-wide adoption.

  13. 3 remaining items

  14. vyv03354 commented on Jun 15, 2017

    @vyv03354

    Although unprivileged create requires the developer mode, it does not matter to WSL because WSL also requires the developer mode anyway.

    This no longer holds. Since build 16215, WSL can run without developer mode enabled.

    Another change: Since build 16193, WSL can follow already created NT symlinks. But it is still not possible to create a new NT symlink.

  15. 131 commented on Oct 30, 2017

    @131

    Any update here ?
    This is also restraining my team for the switch :/

  16. sunilmut commented on Oct 30, 2017

    @sunilmut
    Member

    Sven Groot (@SvenGroot) was working on this one and might be able to provide updates.

  17. 131 commented on Oct 31, 2017

    @131

    mklink (NTFS junctions) are seen as symlink in WSL (fall creator update 1709)

    But beware that it's case sensitive, and WSL cares about it.

    mklink /D node_modules D:\dvp\node_modules\async 
    dir node_modules 
    <JUNCTION>     async-co [D:\dvp\node_modules\async-co]
    => seen as symlink to /mnt/d/dvp/node_modules in WSL
    

    Whereas

    mklink /D node_modules d:\dvp\node_modules\async  (note the lowercase D)
    dir node_modules 
    <JUNCTION>     async-co [d:\dvp\node_modules\async-co]  (works in windows)
    => invalid link in WSL
    
  18. ayalon commented on Oct 31, 2017

    @ayalon

    NTFS junctions work since almost a year. The issue is, that symlinks created inside WSDL result in an unreadable file on the NTFS side.
    This is the remaining task in this thread.

    Tools like composer or modman from magento create tons of symlinks but these do not work on NTFS.

    The missing piece is this:

    ln -s {/path/to/file-name} {link-name}

    readable on NTFS.

  19. Brian-Perkins commented on Nov 22, 2017

    @Brian-Perkins
    Contributor

    Windows Insider Build 17046 contains some improvements for symlink compatibility. See the full description in the release notes

  20. heldchen commented on Nov 22, 2017

    @heldchen

    awesome, works great!

  21. ayalon commented on Nov 23, 2017

    @ayalon

    I can wait to test this. This sounds really really awesome!

  22. tara-raj commented on Jul 31, 2018

    @tara-raj

    Closing as this issue is fixed in Insiders Build 17046 as mentioned above #1475 (comment)

  23. safizn commented on Oct 12, 2018

    @safizn

    Closing as this issue is fixed in Insiders Build 17046 as mentioned above #1475 (comment)

    Tara Raj (@tara-raj) Hi, does that mean that WSL symlinks can be opened with a native Linux container/VM ? I'm trying to do so but cannot seem to get it working.
    #3611
    Help !

  24. RDeluxe commented on Oct 21, 2018

    @RDeluxe

    I don't think @myuseringithub issue is the same as depicted here.
    It's not a case issue.

  25. pyldin601 commented on Feb 1, 2020

    @pyldin601

    Update: Fixed by enabling Windows Developer Mode

    Windows Build 18362.592
    I have problem with Rush-managed monorepo inside WSL. It makes symbolic links inside WSL, which is unreadable from Windows IDE.

    C:\Users\roman\WebstormProjects\...\node_modules>dir
     Volume in drive C is OS
     Volume Serial Number is DE9A-DCBC
    
     Directory of C:\Users\roman\WebstormProjects\...\node_modules
    
    01/31/2020  09:46 PM    <DIR>          .
    01/31/2020  09:46 PM    <DIR>          ..
    01/31/2020  09:46 PM    <DIR>          .bin
    01/31/2020  09:46 PM    <JUNCTION>     koa [...]
    01/31/2020  09:46 PM    <JUNCTION>     koa-body [...]
    01/31/2020  09:46 PM    <JUNCTION>     koa-router [...]
    01/31/2020  09:46 PM    <JUNCTION>     nodemon [...]
    01/31/2020  09:46 PM    <JUNCTION>     parse-strings-in-object [...]
    01/31/2020  09:46 PM    <JUNCTION>     rc [...]
                   6 File(s)              0 bytes
                   4 Dir(s)  80,805,060,608 bytes free
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions