开发者

Symbolic Link, not accessible from network computer. getting error “The symbolic link cannot be followed because its type is disabled”

I have created symbolic link for shared folder on my machine and this symbolic link is present in another share folder on same machine. i can access this folder content using symbolic link from the same machine. however when i try to access the symbolic link from another machine. i am getting access denied error on windows xp. and windows 2008 shows access denied error with "The symbolic link cannot be followed because its type is disabled"

i have also used fsutil behavior set SymlinkEvaluation R2R:1 L2R:1 R2L:1 to create symbolic link on my machine( windows 开发者_开发百科7). i have created symbolic link using kernel32 API CreateSymbolicLink.

i am usign following code to create symbolic link,

[DllImport("kernel32.dll")]
static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int dwFlags);
static int SYMLINK_FLAG_DIRECTORY = 1;


string finalTargetD = @"\\abhande-win2k8\CopiedFiles";
string sharedDirectory = @"\\abhande-xp\SharedFiles";


public static void CreateSymLink()
{
 using (WindowsImpersonationContext ctx = WindowsIdentity.GetCurrent().Impersonate())
 {

  if(CreateSymbolicLink(sharedDirectory, finalTargetD, SYMLINK_FLAG_DIRECTORY))
  {
    //symbolic link created successfully
  }
 }

}  

Do any one have idea why symbolic link is not accessible from another network machine.

Thanks Arvind


The SymlinkEvaluation behaviour needs to be set appropriately on the PC you want to "follow" the symlink on. The symlink source/destination (local/remote) are both relative to the machine opening the symlink.


It probably is caused by symbolic links being resolved on the client machine instead of the server machine. You may be looking for a junction point which would be resolved on the server. Here is another similar question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜