You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I understand that NTFS does not support Symlinks, it is something that would be extremely helpful. The issue that i've found is that any tarball package that has symlinks will simply be broken in the sense that the link is never created. Granted that packages/installers should be able to work around this, but I've already come across this issue within hours of playing around. I can see this causing several issues down the road.
Think of an installer that installs something to /opt/software but creates a symlink to the executable to /usr/local/bin so it would be ready for use immediately without explicitly specifying the path.
Reacted by Denis Washington, Manuel Bieh, William Guss, André Nanninga, Joey Kudish, Per Lundberg, cgull, Kory Nunn, Juan Luis Cano Rodríguez, Dmitriy Kuts and 6 more
I don't believe they intend for Linux symlinks to be able to point to Windows, but Linux symlinks from the Linux filesystem to the Linux filesystem should be fine.
The inability to have symlinks between the Linux and Windows filesystems is unfortunate. For instance, this means that you cannot create a Python virtual environment on a Windows drive because that requires the venv tool to symlink /usr/bin/python and other stuff into the environment directory. It would be great if this restriction could somehow be relaxed!
More serious, though, is not being able to create symlinks within the Windows mount. Even when running Bash as an administrator, I wasn't able to create, a symlink /mnt/c/bar.txt to a file /mnt/c/foo.txt. This is absolutely required for installing many Node packages via NPM, for instance.
There may be a bit of a problem with that since users on Windows by default don't have SeCreateSymbolicLinkPrivilege. As I understand this was done because as lots of applications and maybe even device drivers out there may have subtle security issues with symbolic links.
Requiring users to hold a certain privilege to create symlinks doesn't goes well with posix compatibility either.
Reacted by Stefan Hacker, mintty, GranoblasticMan, Wouter Lagerweij, Erik B, Roy Ivy III, Colby Rogness and Brady Prigge
What Kasper Fabæch Brandt (@poizan42) mentioned about permissions is exacerbated by the fact that - as far as I understand split tokens in UAC - non-elevated processes of users in admin groups (it's RID based, msdn has the details) can never have that privilege. Even if you edit the group policy to add it for everyone that just gets filtered out with no way to override it. Imho this is a major pita and it has bitten me outside of this specific issue. It makes using symlinks on dev setups (whose accounts tend to have admin rights) nearly impossible. Basically you can make it work for the Guest account but not without elevation for an admin :( Would love to see that resolved.
I will add to the symlink issue. I tried to install NVM (node version manager) and RVM (ruby version manager) I ran into issues with cannot create symlink to "" Invalid argument. these tools are essential as working with multiple products I need to be able to easily change which verion of node and ruby I am using.
Wanted to update this one since it's one of our oldest threads.
We have much better symlink support checked into our dev branches. No ETA on when it will hit Insiders, and I expect that the support will roll out slowly (we did not fix all the issues at once). What I can show is what ran on an internal branch:
This is only barely related, but it has been a thorn in my (and many, many others) side for years, and I don't know where else to bring it up, but: since we're now getting sane symlink behavior in one Windows subsystem, can we please, please, please for the love of god, finally correct the behavior in which UAC removes SeCreateSymbolicLinkPrivilege from users' tokens if they're in the Administrators group, even if they've explicitly been given the privilege in some other way? Remember, this insane behavior is ONLY applied to members of the Administrators group--if you give a normal user account permission to create symlinks, they can do it just fine, with no need to elevate!
Reacted by Stefan Hacker, Roy Ivy III, Wouter Lagerweij, TSlivede, Patrick Boos, Bohdan Yurov, Colby Rogness and Ruijie Yu
Mark Laws (@drvink), I feel your pain here and have forwarded this along to the correct team.
Additionally, you should start something over on our User Voice. We have a number of symlink suggestions over there but they are all around WSL. Getting this as a separate item may be helpful.
I have currently build 15063 on Windows Insiders Preview, I create sysmlink in windows (symlink target is on the same drive) and I can not read it on WSL. When it is going to be working?
Hm it seems it works but in strange manner: I can not see linked directory when I do ls -a, can I can not readlink /path/to/linked_folder but I can work with nested folders and files, ls or read them =)
I have a removable ntfs driver, it worked in a ubuntu, on which symbolic links created. now when I connect the ntfs driver to windows and wsl, the links all not work.
Activity
mizzle-mo commentedon Apr 7, 2016
NTFS has supported symlinks since Windows 2000. NTFS Junction Point
jokeyrhyme commentedon Apr 7, 2016
Related to #3 and/or #9 ?
robertsmieja commentedon Apr 7, 2016
Look under "Is there any distinction between files in the Linux drive and the mounted Windows drives?" at https://msdn.microsoft.com/en-us/commandline/wsl/faq
I don't believe they intend for Linux symlinks to be able to point to Windows, but Linux symlinks from the Linux filesystem to the Linux filesystem should be fine.
denisw commentedon Apr 7, 2016
The inability to have symlinks between the Linux and Windows filesystems is unfortunate. For instance, this means that you cannot create a Python virtual environment on a Windows drive because that requires the venv tool to symlink /usr/bin/python and other stuff into the environment directory. It would be great if this restriction could somehow be relaxed!
More serious, though, is not being able to create symlinks within the Windows mount. Even when running Bash as an administrator, I wasn't able to create, a symlink
/mnt/c/bar.txtto a file/mnt/c/foo.txt. This is absolutely required for installing many Node packages via NPM, for instance.mizzle-mo commentedon Apr 7, 2016
I just created a symlink from ~/home -> /mnt/c/Users/tellm and it worked fine.
denisw commentedon Apr 7, 2016
This direction (symlink from Linux to Windows) indeed works - the other one (symlink from Windows to Linux) doesn't.
poizan42 commentedon Apr 7, 2016
There may be a bit of a problem with that since users on Windows by default don't have SeCreateSymbolicLinkPrivilege. As I understand this was done because as lots of applications and maybe even device drivers out there may have subtle security issues with symbolic links.
Requiring users to hold a certain privilege to create symlinks doesn't goes well with posix compatibility either.
spichardo commentedon Apr 7, 2016
The issue with symlinks happens when you either try to tar to directory with symlinks or untar that contains them, look the simple example:
root@localhost:
# mkdir test# cd testroot@localhost:
root@localhost:
/test# echo "this is a file" > t.xt/test# ln -s t.xt link_to_fileroot@localhost:
root@localhost:
/test# ls -l/test# cd ..total 0
lrwxrwxrwx 1 root root 4 Apr 7 23:43 link_to_file -> t.xt
-rw-rw-rw- 1 root root 15 Apr 7 23:43 t.xt
root@localhost:
root@localhost:~# tar cfz test.gz test/
tar: test/link_to_file: Cannot readlink: Invalid argument
tar: Exiting with failure status due to previous errors
spichardo commentedon Apr 7, 2016
and this is also related to #50
tinysun212 commentedon Apr 8, 2016
pointed the same thing to #9
hacst commentedon Apr 9, 2016
What Kasper Fabæch Brandt (@poizan42) mentioned about permissions is exacerbated by the fact that - as far as I understand split tokens in UAC - non-elevated processes of users in admin groups (it's RID based, msdn has the details) can never have that privilege. Even if you edit the group policy to add it for everyone that just gets filtered out with no way to override it. Imho this is a major pita and it has bitten me outside of this specific issue. It makes using symlinks on dev setups (whose accounts tend to have admin rights) nearly impossible. Basically you can make it work for the Guest account but not without elevation for an admin :( Would love to see that resolved.
JonHerr commentedon Apr 11, 2016
I will add to the symlink issue. I tried to install NVM (node version manager) and RVM (ruby version manager) I ran into issues with cannot create symlink to "" Invalid argument. these tools are essential as working with multiple products I need to be able to easily change which verion of node and ruby I am using.
MadcowD commentedon Apr 12, 2016
This issue has been closed #9 Rich Turner (@bitcrazed) please closed this #6
perlun commentedon Apr 12, 2016
Related user-voice question: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13254597-support-for-symlinks-and-long-filenames-in-bash
russalex commentedon Apr 19, 2016
Wanted to update this one since it's one of our oldest threads.
We have much better symlink support checked into our dev branches. No ETA on when it will hit Insiders, and I expect that the support will roll out slowly (we did not fix all the issues at once). What I can show is what ran on an internal branch:
4 remaining items
russalex commentedon May 11, 2016
Stefan Hacker (@hacst), We have a few more blog posts in the works with one of them being a deep dive into the filesystem. Stay tuned.
To answer your immediate question, these symlinks are not backed by NTFS.
I'll be closing this issue out soon to keep things clean.
drvink commentedon Jun 2, 2016
This is only barely related, but it has been a thorn in my (and many, many others) side for years, and I don't know where else to bring it up, but: since we're now getting sane symlink behavior in one Windows subsystem, can we please, please, please for the love of god, finally correct the behavior in which UAC removes
SeCreateSymbolicLinkPrivilegefrom users' tokens if they're in the Administrators group, even if they've explicitly been given the privilege in some other way? Remember, this insane behavior is ONLY applied to members of the Administrators group--if you give a normal user account permission to create symlinks, they can do it just fine, with no need to elevate!russalex commentedon Jun 2, 2016
Mark Laws (@drvink), I feel your pain here and have forwarded this along to the correct team.
Additionally, you should start something over on our User Voice. We have a number of symlink suggestions over there but they are all around WSL. Getting this as a separate item may be helpful.
drvink commentedon Jun 3, 2016
Russ Alexander (@russalex), this is wonderful to hear. Thank you so much! I'll add a UV suggestion too.
drvink commentedon May 20, 2017
Updating this thread with some good news for anyone who finds it: it is possible to create symlinks without elevation as of Windows 10 build 14972 if "developer mode" is enabled. Thanks again, Russ Alexander (@russalex)!
wclr commentedon Jun 3, 2017
I have currently build 15063 on Windows Insiders Preview, I create sysmlink in windows (symlink target is on the same drive) and I can not read it on WSL. When it is going to be working?
wclr commentedon Jun 3, 2017
Hm it seems it works but in strange manner: I can not see linked directory when I do
ls -a, can I can notreadlink /path/to/linked_folderbut I can work with nested folders and files, ls or read them =)nick4fake commentedon Jul 20, 2017
Hey,
Good work guys, thank you a lot for all your patience bringing this up into windows!
I have just a small follow-up question: what about cross windows/wsl symlinks?
I'd really love the symlink to be created from bash as NTFS symlink on real drive for compatibility.
nick4fake commentedon Jul 20, 2017
Sorry, just saw #353
jan4984 commentedon Nov 19, 2018
I have a removable ntfs driver, it worked in a ubuntu, on which symbolic links created. now when I connect the ntfs driver to windows and wsl, the links all not work.
is any way keep my links between ubuntu and wsl?
cavaunpeu commentedon Dec 2, 2018
However, when I:
DynConcepts commentedon Feb 27, 2024
Yes, but now exit WSL [or simply open a CMD prompt window and go to D:\temp and try to access things....