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

Cannot create symbolic links on drvfs network share #5524

Open
mfroment opened this issue Jul 2, 2020 · 3 comments
Open

Cannot create symbolic links on drvfs network share #5524

mfroment opened this issue Jul 2, 2020 · 3 comments
Labels

Comments

@mfroment
Copy link

mfroment commented Jul 2, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.329] 
Your Distribution version: Ubuntu Release:        20.04
Issue in WSL2

Steps to reproduce

I have 2 PCs with same WSL2+ubuntu set up, and sharing my respective WSL home directories (set to C:\Users\MyUserName\WSL_home) as \\PC{1,2}\WSL_home
Mounting the remote home dir in WSL works fine (permissions, ownership, file & directory CRUD, symlink following), except for symbolic link creation.

$ sudo mount -t drvfs '\\PC2\WSL_home\'  /mnt/rhome -o metadata,uid=1001,gid=1001
$ cd /mnt/rhome
$ ln -s /mnt/c/Users/MyUserName nthome
ln: failed to create symbolic link 'nthome': Operation not permitted
$ touch dummyfile
$ ln -s dummyfile dummylink
ln: failed to create symbolic link 'dummylink': Operation not permitted

I have tried to mount local pc share (\\localhost\WSL_home) and do same steps as above, same outcome.

I have also tried combinations of running WSL as administrator or not, granting (or not) Symbolic Link Creation by policy, enabling (or not) symbolic link evaluations for remote to local & remote to remote symbolic link ; this on local and/or remote hosts. Same outcome.

Strace gist for the dummyfile -> dummylink example, with \\localhost\WSL_home\ mounted as /mnt/rhome

Expected behavior

(WSL) symbolic link to be created.

Actual behavior

Cannot create symbolic link on mounted network share.

@therealkenc
Copy link
Collaborator

This is same #2144 (answer: message). I suspect but can't prove that answer stands, considering #4868

Issue in WSL2

On WSL2 you can do:

$ sudo mount -t cifs -o username=julius,password=password,uid=1000,gid=1000,vers=3.0,mfsymlinks //192.168.48.1/Users/julius ./mnt

image

@mfroment
Copy link
Author

mfroment commented Jul 3, 2020

Thanks for the heads up on mounting with cifs.
That does allow creating symlinks on the shared drive.

But those are Minshall+French links, not WSL symbolic links (or any kind of reparse point).
So they do not work on a WSL session run on the 2nd PC (where they appear as plain files "XSym ... ").

@therealkenc
Copy link
Collaborator

But those are Minshall+French links

Yeah, it isn't worth much and doesn't satisfy your ask. I was just throwing it out there.

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

No branches or pull requests

2 participants