Fix symbolic link following on Windows

Get help for specific problems
Posts: 7
Joined: 6 Mar 2017

maphewyk

When attempting to synchronize directories from one Windows Server to another that contained symbolic links I was getting the error "ERROR_SYMLINK_CLASS_DISABLED: The symbolic link cannot be followed because its type is disabled. [CreateFile]". Under [Compare] the symlink setting is set to 'Follow', so administrative privileges on the server should not be required.

After some flailing about I learned this is do to a policy on the _local_ machine. The symbolic-link resolution behavior is set on the machine that accesses a given link, not the machine that hosts it.

Changing the setting requires admin privileges for local machine but reading and following the links does not.

From Admin command prompt show the current settings with:
fsutil behavior query SymlinkEvaluation
C:\>fsutil behavior query SymlinkEvaluation

Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are disabled.
Remote to remote symbolic links are disabled.
And enable following of all link types with:
fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
Sources:

* https://neurotechnics.com/blog/fix-symbolic-link-cannot-be-followed/
* https://stackoverflow.com/questions/229643/how-do-i-overcome-the-the-symbolic-link-cannot-be-followed-because-its-type-is
Posts: 7
Joined: 6 Mar 2017

maphewyk

Watch for group policy from central IT might push down and overwrite whatever changes you make on the next update cycle. For us they disable Remote-to-local links (which does make sense).