AVIDeveloper
AVIDeveloper

Reputation: 3476

cygwin winsymlinks:native doesn't work

I'm battling with cygwin for quite a while now.
I searched far and wide on how to make cygwin create Windows-style symbolic links.

I tried the following:

export CYGWIN="winsymlinks:native"
export CYGWIN="winsymlinks:nativestrict"
export CYGWIN="winsymlinks:lnk"

For the life of me - I can't get the Windows native symlinks to work. I'm working on Windows7/64bit; cygwin version 1.7.25.

I'd love to get a solution for this one.

Thank you.

Upvotes: 3

Views: 3853

Answers (3)

gavenkoa
gavenkoa

Reputation: 48753

Expect it to work with Windows 10 Creator update when you enable developer mode

Something to consider:

https://github.com/git-for-windows/git/wiki/Symbolic-Links

  • Symbolic links are only available on Windows Vista and later, most notably not on XP
  • You need the SeCreateSymbolicLinkPrivilege privilege, which is by default assigned only to Administrators and guarded by UAC, but can be assigned to other users or user groups (see below).
  • Symbolic links on remote filesystems are disabled by default (call fsutil behavior query SymlinkEvaluation to find out)
  • Symbolic links will only work on NTFS, not on FAT nor exFAT
  • Windows' symbolic links are typed: they need to know whether they point to a directory or to a file (for this reason, Git will update the type when it finds that it is wrong)
  • Many programs do not understand symbolic links

Upvotes: 1

Liyu Gong
Liyu Gong

Reputation: 79

I got the same problem. In my case, I used winsymlinks:nativestrict and received an error report saying: Operation is not permitted.

This is becase of Windows UAC and the terminal emulator not being started with elevated privileges. So I run Cygwin mintty as administrator (you can right click the shortcut and choose "Run as administrator" or set the mintty shortcut property: Advanced -> Run as Administrator). After that, everything just works perfectly.

Upvotes: 7

JeremyB
JeremyB

Reputation: 185

I also battled with this one for a while on Windows 7 with Cygwin.

Everything I read seemed to say that it needed export CYGWIN="winsymlinks:native", but no luck for me.

Then I read this blog http://zzamboni.org/blog/making-cygwin-windows-and-emacs-understand-th/ which said that just "winsymlinks" was all you need. Tried that and it worked beautifully :)

Just use this environment variable. export CYGWIN="winsymlinks"

Upvotes: 4

Related Questions