link(2) fails on mounted network shares

Christopher Faylor cgf-no-personal-reply-please@cygwin.com
Tue May 31 00:18:00 GMT 2005


On Tue, May 31, 2005 at 01:39:04AM +0200, Martin Koeppe wrote:
>Hello,
>
>I recently found out that you cannot create hardlinks
>on mounted network shares with cygwin
>(error: No such file or directory),
>but you can do it with the ln.exe from Interix.
>
>So I looked at it and found that the Windows API
>function CreateHardLink() causes the trouble, it apparently
>only works for local drives.
>
>There is another API function, however, which creates hardlinks
>correctly on local and network drives (tested on Win2003 shares
>and Samba shares):
>
>MoveFileEx() with parameter:
>#define MOVEFILE_CREATE_HARDLINK 16

I've found two references to this in MSDN.  Both say:

MOVEFILE_CREATE_HARDLINK 	Reserved for future use.

That doesn't sound too encouraging as far as compatibility is concerned.

cgf



More information about the Cygwin-patches mailing list