Cannot create symbolic links as administrator
Using MKLINK, I receive the following error when trying to create a symbolic link to a directory: "You do not have sufficient privilege to perform this operation" The command I use, for example is: mklink /d c:\images c:\data\images I checked in the Local Security Polcies for User Rights Assignment, and the Security Setting for Create symbolic links is set to Administrators. The user I am logged on with is in the Administrators Group. Any ideas or similar experiences?
February 22nd, 2010 8:55am

Hi, have you tried run "cmd" as Administrator? If I run "cmd" as Administrator, I do not get this error message.Sean Zhu - MSFT
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2010 3:55am

Hi, have you tried run "cmd" as Administrator? If I run "cmd" as Administrator, I do not get this error message. Sean Zhu - MSFT I'm afraind that a year later the problem still exists, and the fix does not work. From an administrator (user: admin) shell: C:\Users\admin>mklink toggleNic ..\public\ToggleIPadrs.cmd You do not have sufficient privilege to perform this operation. C:\Users\admin>CMD /C "mklink toggleNic ..\public\ToggleIPadrs.cmd" You do not have sufficient privilege to perform this operation. Direct or via cmd, MKLINK doesn't work. Yet, there is a veritable MESS of links in my Windows 7 installation. I would like to know where to get official Microsoft explanations of MKLINK: a. how to create symbolic links, as clearly the help from "MKLINK /?" doesn't work, and b. WHY doesn't it work? and c. what is the differences between hard and symbolic links. Eb
January 12th, 2011 10:43pm

> b. WHY doesn't it work? For your safety. You have payed the money and we provide best security we can. We create facilities that do not work for your security. Something dangerous can happen to your data if you create a link. We prohibit file creation in the next release of our OS.
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 4:31pm

Eb, Look at this article this explains clearly how you can use the MKLink command in Windows 7. http://www.windows7home.net/how-to-create-symbolic-link-in-windows-7/ If you say you run an administartor shell, can you see in the title of that shell starts with "Administrator:"? To answer your questions. A. It does work on Windows 7. B. see anwser A. C. Hard Link A hard link directly points to the file, and acts to the operating system as if it is the file itself. You’ll want to use this option the majority of the time if you are trying to fake an application’s directory. Soft Link A soft link is essentially a shortcut to a file or folder – if you are using Windows explorer, you’ll be redirected to the directory if you double-click on a shortcut, it won’t pretend its part of the filesystem. You can still directly reference or open a file with the symlinked path, and it mostly works.IM me - TWiTTer: @DFTER
April 14th, 2011 1:58pm

Did you right click on the 'command prompt' icon, and pick 'run as administrator'? It's also possible to set permissions on a file so that you can't make a hard link to it, even with high integrity, like svchost.exe.
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2011 8:05pm

> b. WHY doesn't it work? For your safety. You have payed the money and we provide best security we can. We create facilities that do not work for your security. Something dangerous can happen to your data if you create a link. We prohibit file creation in the next release of our OS. Since MS doesn't fix things in days or months, but takes years, I only visit here every now and then ;-). Alright! Prohiibit file creation! Thanks for the heads up. I guess Ill have to create a bunch of dummy files now, in preparation for the next realease. Now don't tell me, that the release AFTER next will also prohibit file modification?
August 10th, 2011 8:51pm

If you say you run an administartor shell, can you see in the title of that shell starts with "Administrator:"? To answer your questions. A. It does work on Windows 7. B. see anwser A. C. Hard Link A hard link directly points to the file, and acts to the operating system as if it is the file itself. You’ll want to use this option the majority of the time if you are trying to fake an application’s directory. Soft Link A soft link is essentially a shortcut to a file or folder – if you are using Windows explorer, you’ll be redirected to the directory if you double-click on a shortcut, it won’t pretend its part of the filesystem. You can still directly reference or open a file with the symlinked path, and it mostly works. IM me - TWiTTer: @DFTER Thans for your reply. Yes I really did have an administrative shell. But the problem exists even if I log on as administrator. As to the explanation of hard versus soft links, the key thing I want to know, before experiment further is, what happens when you DELETE a link? Will deleting a hard link also delete the underlying file/folder? Will deleting a soft link leave the underlying file/folder untouched? How does a soft link differ from a windows shortcut? Finally (remeber, I cannot create these links) do both hard and soft links return their own path when queried (dir linkname), or do they return the underlying file's name? Thanks, Eb
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2011 9:15pm

Did you right click on the 'command prompt' icon, and pick 'run as administrator'? It's also possible to set permissions on a file so that you can't make a hard link to it, even with high integrity, like svchost.exe. No, I opened the admin shell via shortcut "C:\Windows\System32\runas.exe /user:heatpump\admin "cmd /A /Q /T:1E"" where admin is the name of my administrative account. File permissions appear to be full control, but I'll have to look into that. Perhaps there is a folder permission involved. Thanks fot the tip.
August 10th, 2011 9:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics