开发者

WriteFile for a symbolic link which points a network volume's file

开发者 https://www.devze.com 2023-01-15 04:17 出处:网络
I made a symbolic link file. mklink C:\\LinkFileToPointNetworkFile开发者_运维问答.txt Z:\\NetworkFile.txt

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?


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
0

精彩评论

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

关注公众号