Trouble creating real NTFS links using Cygwin

4

1

I have administrator privileges and would like Cygwin's ln -s to make NTFS links instead of the fake !<symlink> files that only Cygwin understands.

I tried the following, based on Cygwin documentation:

  • set my CYGWIN environment variable to winsymlinks:native in my .bashrc file
  • ran the shell as an Administrator (required for use of mklink)

Yet whenever I try ln -s //networkdrive/directory.65, Cygwin actually creates a "symlink file" instead of an NTFS junction. In the file browser, I can't enter the directory "directory.65" because Windows does not see it as a directory, but instead a "65" file.

Am I actually running it as an Administrator? I set the "Run as administrator" seting for the Desktop shortcut and the executables, C:\cygwin\bin\mintty.exe and C:\cygwin\bin\bash.exe.

Note: uname shows that I am using Cygwin 1.7.18.

edit: Using cmd.exe and issuing mklink /D directory.65 \\networkdrive\directory.65 indeed made a real NTFS link. The problem is just getting Cygwin's ln -s to do the same.

tomocafe

Posted 2014-07-11T22:57:48.803

Reputation: 371

Answers

2

I changed my CYGWIN environment variable from

export CYGWIN=winsymlinks:native

to

export CYGWIN=winsymlinks

The former is in the current documentation, but that format is apparently not supported in Cygwin 1.7, even though 1.7 does support native NTFS links.

Switching to the older format solved the issue.

tomocafe

Posted 2014-07-11T22:57:48.803

Reputation: 371