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 1819
不思量自难忘°
不思量自难忘° 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:41

    To add to @David Arno's helpful answer, based on W7:


    fsutil.exe can be made to show what arguments it takes by simply running:

    fsutil behavior set /?
    

    To report the current configuration, run fsutil behavior query SymlinkEvaluation - see @Jake1164's answer, particularly with respect to how a group policy may be controlling the behavior.

    The symbolic-link resolution behavior is set on the machine that accesses a given link, not the machine that hosts it.

    The behavior codes for fsutil behavior set SymlinkEvaluation - namely L2L, L2R, R2L, and R2R - mean the following:

    • L stands for "Local", and R for "Remote" (who would've thunk?)
    • The FIRST L or R - before the 2 - refers to the location of the link itself (as opposed to its target) relative to the machine ACCESSING the link.
    • The SECOND L or R - after the 2 - refers to the location of the link's target relative to the machine where the LINK itself is located.

    Thus, for instance, executing fsutil behavior set SymlinkEvaluation R2L means that you can access links:

    • located on a remote machine (R)
    • that point to targets on that same remote machine (L)

    Unlike what David experienced on Vista, I, on W7, was able to resolve a remote link that pointed to a resource on another remote machine by enabling R2R alone (and not also having to enable R2L).

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

    FYI if you have Group Policies in place controlling SymlinkEvaluation settings you CAN still set them yourself from the command line. They will be overwritten by GP at next reboot/login but your settings will work during your user session.

    So as a workaround if you need to set it to something other than what GP dictates you could even run a script at logon to set them after GP is applied.

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