Super User Asked by Vegard Larsen on December 31, 2020
I am having an issue creating a symbolic link on Windows 7 Ultimate. I want to map a folder from a mapped network drive into My Documents.
mklink /D "C:UsersVegardDocumentsVirtual Machines" "Z:Virtual Machines"
returns You do not have sufficient privilege to perform this operation.
.
Z:Virtual Machines
is set to be available offline, but I am online when I am trying this.
This is what I’ve tried (as suggested here):
Using Local Security Policy to add my user to Local PolicesUser Rights AssignmentsCreate symbolic links, and rebooting. No luck.
Running cmd.exe as an Administrator, but then I cannot see the mapped network drive at all. I can however create symbolic links on the drive.
Using fsutil
to change symlinkevaluation
, to set R2L:1
(even though it seem to me I want L2R
, which is already enabled).
Using full UNC path of the shared folder does not work either (The syntax of the command is incorrect.
when run as an administrator, You do not have sufficient privilege to perform this operation.
when run as a normal user).
Output of fsutil behavior query symlinkevaluation
:
C:Windowssystem32>fsutil behavior query symlinkevaluation
Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are enabled.
Remote to remote symbolic links are disabled.
Any ideas?
My solution became to disable User Account Control, reboot, then create the symlinks as my own user, then re-enabling UAC and rebooting again.
Rather unfortunate if I need to create further symlinks at a later stage, but it does work, it is just very inconvenient.
Correct answer by Vegard Larsen on December 31, 2020
The answer below is doesn't exactly answer the question, but since I ended here after searching for my issue, I'll add my solution.
Somehow I always got the
The system cannot find the file specified.
when I tried to make a hardlink using mklink
.
However, when I used fsutil hardlink
it worked.
Note that the source and destination folders for mklink
and fsutil hardlink
are reversed!
Answered by Roald on December 31, 2020
fsutil behavior set SymlinkEvaluation R2R:1
Answered by Shaun Hutchings on December 31, 2020
You cannot do symbolic links in networks and mapped drive as source, you can only use it as target and the source is your local drives
you cannot do like this:
Mapped Drive is Drive Z: Target (Local drive or Network)
Mklink /d z:SourceFolder c:Target Mklink /d z:SourceFolder F:SharedNetworkFolder
they are error and cannot used as symbolic links
only from Local to network and Local to Local only will work in symbolic links
Answered by Mark on December 31, 2020
If you are doing this in Powershell, you'll need to open CMD first:
CMD /C MKLINK /D C:localpath \UNCpathfolder
The /C
argument tells CMD to run the command in the string and then exit.
Answered by music2myear on December 31, 2020
You need to enable local to remote links by running this command with elevated rights:
fsutil behavior set SymlinkEvaluation L2R:1
Also you can enable this with your local or group policy: ComputerSystemFilesystemSelectively allow the evaluation of a symbolic link → allow local to remote
Answered by Matthias on December 31, 2020
This is a old thread, but still want to clarify that you can create symbolic links like this:
Your user account has some security policies on them by default which can be disabled, through secpol.msc. Go to the Run dialog and type:
secpol.msc
Local Policies > User Rights Assignment
When you log back in, run cmd
with admin privileges. Now you should be able to run mklink commands like this with no problems:
mklink /d %userprofile%music \servermusic
Note: Make sure the directory you're trying to link to exists or hasn't been moved or deleted, prior to linking.
Answered by reconx86 on December 31, 2020
Run cmd as administrator and use UNC path.
The following command worked for me as administrator:
mklink /D C:temp11111 \serversharefoldername
And also check whether your command contains appropriate quotes ("
).
Answered by jhamu on December 31, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP