views:

17

answers:

1

I made a symbolic link file.

mklink C:\LinkFileToPointNetworkFile.txt Z:\NetworkFile.txt

Then I opened and read the file. Good. It works well. The target file's data has been read.
-Of course, I didn't use FILE_FLAG_OPEN_REPARSE_POINT

But if I try writing to the file, I get a 'access is denied'.
This is not what I expected.
Why does it work like this?

+1  A: 

Symlinks are intentionally disabled over network shares by default for security reasons. You can change this on your machine via:

fsutil behavior set SymlinkEvaluation L2L:1 L2R:1
Paul Betts
What do L2L:1 L2R:1 mean? How can I reset the behavior?
Benjamin
Could you explain me about the security reasons please.
Benjamin
"L2R" => "Local to Remote", "L2L" => "Local to Local", etc.
Paul Betts
You could imagine somebody being clever and redirecting system files to point to network shares containing evil versions of DLLs, etc.
Paul Betts