Using Mklink to link one local folder to a mapped network drive “Access is denied on mklink”

Using Mklink to link one local folder to a mapped network drive "Access is denied on mklink"
Our setup… We need to link a folder (that not exits jet) in E:\  (local drive)  to a share .
In this case we need to create a  symlink to a network mapped drive…

Using Mklink to link one local folder to a mapped network drive "Access is denied on mklink"

First, we need to map the share with net use in permanent mode..
Run this command:
net use P: \\srvvc\storage\test /user:\administrator xxxxxxxxx  /persistent:yes
Now we need to verify the state of  remote symbolic links  and, if not, enable it.
Run this command :
fsutil behavior query SymlinkEvaluation

Using Mklink to link one local folder to a mapped network drive "Access is denied on mklink"

So we  have to enable it with this command :
fsutil behavior set SymlinkEvaluation R2R:1

Using Mklink to link one local folder to a mapped network drive "Access is denied on mklink"

At this point we can create a Symlink to a network mapped share with  this command:

mklink test p:\test

Using Mklink to link one local folder to a mapped network drive "Access is denied on mklink"

That’s it.

2 Comments

  1. Thanks for your post, but I think that you should run


    fsutil behavior set SymlinkEvaluation L2R:1

    instead of


    fsutil behavior set SymlinkEvaluation R2R:1

    to enable the access to the network location from the local disk.

    Even if local to remote symbolic links are disabled, on the local disk we can still create a symbolic link that points to the network location, but the network location that this symbolic link points to can’t be accessed.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *