How do I overcome the “The symbolic link cannot be followed because its type is disabled.” error when getting the target of a symbolic link?

后端 未结 8 1818
不思量自难忘°
不思量自难忘° 2020-12-04 08:16

Following on from a previous question, I am creating a symbolic link on a Server 2008 from a Vista machine using UNC paths. I can create the link just fine. I can go to the

相关标签:
8条回答
  • 2020-12-04 08:22

    I recently found this on all my corporate Windows 7 boxes when one of my legacy programs stopped working. After some searching and finding these settings I tried setting via the command line and via the registry with no relief.

    I found that you can use the command from an elevated prompt:

    fsutil behavior query SymlinkEvaluation
    

    This will return the status of these links AND in my case that they are being controlled by a group policy! Thanks IT department (you f@$#%$rs)!

    enter image description here

    0 讨论(0)
  • 2020-12-04 08:28

    Thanks David for the tip, I was becoming desperate to fix this problem which made symlinks mostly useless.

    One should note that the default configuration for Vista is L2L and L2R enabled, but R2R and R2L disabled.

    I first tried to enable only R2R, but this is not sufficient. R2L has to be enabled too.

    The next question on my list: How to get rid of that stupid /D switch for the mklink command for directory links. The default link type should be inferred automatically from the target pathname type!

    0 讨论(0)
  • 2020-12-04 08:29

    These settings can also be manipulated directly via the registry (requires local admin to write):

    Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

    Registry values (name/data pairs):

    Name                             Type       Data  (1: Enabled; 0: Disabled)
    -------------------------------------------------
    SymlinkLocalToLocalEvaluation    REG_DWORD     1
    SymlinkLocalToRemoteEvaluation   REG_DWORD     1
    SymlinkRemoteToLocalEvaluation   REG_DWORD     1
    SymlinkRemoteToRemoteEvaluation  REG_DWORD     1
    

    Official documentation is difficult to find, but this appears to be an official Microsoft page: Selectively allow the evaluation of a symbolic link

    0 讨论(0)
  • 2020-12-04 08:31

    Well I found the answer, though to describe it as badly documented is an understatement!

    First of all, this TechEd article highlights the fact that users can "enable or disable any of the four evaluations that are available in symbolic links". Those four "evaluations" include remote to local and local to remote. It doesn't give any clue as to how to do this.

    However a further search revealed this fsutil help page, which does actually document how to "enable or disable any of the four evaluations that are available in symbolic links". So to fix the problem I was having, I need to issue the following command on the Vista box:

    fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
    

    in order to allow full access to where symlinks are pointing on both local and remote machines.

    0 讨论(0)
  • 2020-12-04 08:35

    These settings can also be manipulated directly via the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem: See SymlinkLocalToLocalEvaluation, SymlinkLocalToRemoteEvaluation, SymlinkRemoteToLocalEvaluation, SymlinkRemoteToRemoteEvaluation.

    if with "fsutil behavior query SymlinkEvaluation" you get message .."is currently controlled by group policy"..., check HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Filesystems\NTFS or simply search throug registry for "Symlink"

    0 讨论(0)
  • 2020-12-04 08:37

    Remote junction points work by default. For files you still need symlinks.

    0 讨论(0)
提交回复
热议问题