views:

2536

answers:

6

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 Server 2008 box and double click on the link in explorer to open the target file. What I cannot do though is use FileCreateW to get a handle to the UNC path link (from the Vista box). When I try it, it fails and GetLastError() returns error code 1463 (0x5B7), which is:

The symbolic link cannot be followed because its type is disabled.

Can anyone tell me how to enable its "type" in Server 2008 (assuming the error means what it says)?

+4  A: 

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 giev 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.

David Arno
+1  A: 

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!

"The default link type should be inferred automatically from the target pathname type!"Agreed!
Fowl
A: 

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

Ian Kelling
A: 

This is great. Thanks for the info. I actually didn't have to bang my head looking for the solution because your site was one of the first results.

However has anyone figured out if Windows XP clients will work with Symlinks?

My Windows 7 clients work fine, but I can't get Windows XP working. The error message I get is:

"You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

The system cannot find message test for message 0x in the message file for \PATH"

Ryan
A: 

Helpful, thanks.

Just to add some more info (based on W7):


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

fsutil behavior set /?

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.exe", 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, enabling "R2L" means that you can access links located on a remote machine that point to targets on that same remote machine.


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).

mklement
A: 

Thank you very much. I tried and tested a lot to get a SymLink working via SMB Share... Now I can use it on my Windows machines after I found this thread!

From my network streaming media player it doesnt work yet, because of course I cant set the fsutil... parametrs there (it is PopcornHour A200 and xTreamer whichs firmware is based on Linux).

Some ideas to get access to the Symlink over network with this clients?

Best regards

Adrian

Adrian

related questions