rsync problem with symbolic links on Cygwin

John Neil john at
Tue Aug 12 22:19:46 GMT 2008

Dear rsync maintainers,

Hi, I have been seeing a problem for awhile in an rsync script I  
maintain with how rsync syncs symbolic links between and rsync daemon  
running on Linux and an rsync client running on recent Cygwin that I  
am wondering is a known issue. Basically rsync always copies symbolic  
links, even when they already exist on the destination.  I run rsync  
multiple times, with the source not changing between runs, and rsync  
copies symbolic links every time.

In looking into this issue it appears to me it is related to the way  
Cygwin creates symbolic links.  By default Cygwin has for awhile  
created symbolic links as Windows shortcuts, which results in '.lnk'  
being appended to the symbolic link file name on the Windows volume  
(although Cygwin ls will hide this extension).  I suspect this causes  
rsync to think the symbolic link does not exist on the destination and  
recopy it.

Cygwin has an 'nowinsymlinks' env var switch to revert it symbolic  
link behavior to its previous default of creating symbolic links as  
UNIX links (see "How do symbolic links work?" at 
, and one can easily confirm this env var works correctly with the ln - 
s command in the Cygwin shell.  However, this env var seems to have no  
effect on rsync.  I tried setting it in both my script and also as a  
Windows environment variable, and neither had any effect on this  

Is rsync somehow ignoring the 'nowinsymlinks' env var, or does the  
method that it uses to create symbolic links not respect this env var  
on Cygwin?  I looked briefly at the rsync 3.0.3 source and it did not  
appear to me that rsync alters this env var.

I see this problem with both rsync 2.6.9 and rsync 3.0.3 on Cygwin.   
The Linux rsync daemon is running rsync 2.6.9.


John Neil

More information about the rsync mailing list