X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 4 Mar 2010 12:49:02 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Strange symlink behaviour Message-ID: <20100304114902.GC7980@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20100304094847 DOT GZ17293 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mar 4 06:41, Alfred von Campe wrote: > >Real symlinks on a remote CIFS system are not recognized by Cygwin or > >Windows either. Rather, they are converted to real files by the > >underlying CIFS server so that "dumb" Windows clients don't get > >confused. > > Ah, that makes sense and explains some behavior I was seeing. > > >Symlinks created with and for Cygwin are not real symlinks (with an > >exception). They are files with special properties so that they are > >recognized as symlinks by Cygwin. > > Does that also apply to a symlink extracted from a tar file created > on Linux? Yes. And that makes sense. Think about it. > >Bottom line is, if you create symlinks via Cygwin, they will only be > >recognized by Cygwin clients. If you want symlinks which work on all > >systems (NFS->Linux, CIFS->Windows, CIFS->Cygwin), you have to create > >the symlinks using a Linux client. > > That's what I was afraid of. My real issue is that this all works > when I extract the tar ball into an empty directory, but it doesn't > when the symlink already exists and a short cut is created instead. > If the "rm //path/to/share/*" would simply delete the symlink I > would not be having this problem. Wait, a thought just occurred to > me. What if I delete the symlink first instead of deleting "*". > I'll try this when I get to work today and report back with the > results. What you can do is to switch 1.5 to "CYGWIN=nowinsymlinks", the default in 1.7. This creates files which have no .lnk suffix, but the SYSTEM DOS bit set. This has two other problems, though. - The CIFS filesystems will have to support DOS attributes. - The symlink is still no real symlink since that's not supported in CIFS for Windows clients. It's just some file which is only recognized as symlink by Cygwin. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple