-
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
Symlink woes #6
Comments
NTFS has supported symlinks since Windows 2000. NTFS Junction Point |
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. |
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 |
This direction (symlink from Linux to Windows) indeed works - the other one (symlink from Windows to Linux) doesn't. |
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. |
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: |
and this is also related to #50 |
pointed the same thing to #9 |
What @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. |
This issue has been closed #9 @bitcrazed please closed this #6 |
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:
|
Awesome! That is pretty much the missing link (pun intended) to make Bash on Windows work for me. Looking forward to seeing these changes in future Insider builds! |
Awesome work. Could you talk a bit about how this is implemented technically? Are those symlinks backed by NTFS or something special to WSL? In case of the former I would love to know how the permissions are handled w.r.t SeCreateSymbolicLinkPrivilege and dual/split tokens in admin accounts. |
@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. |
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 |
@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. |
@russalex, this is wonderful to hear. Thank you so much! I'll add a UV suggestion too. |
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? |
However, when I:
|
Yes, but now exit WSL [or simply open a CMD prompt window and go to D:\temp and try to access things.... |
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.The text was updated successfully, but these errors were encountered: