X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:subject:to:references:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=yGHbhY4BoJS8gV5r92muRbp0DbJIhWeuq7nziNXhkzC mxo8CDg6ircQ8F6sIzXEzdmrS4cu4HZbhIOTjnNOrVLY4FJMtM4UhTJZ1pcOe1Oj 43TdGkEw2iXWkgL1xiHC4WUL2YOuB0+R9OZP1Yi/Ai5ervhR4MnrxEyuDhl8jDwU = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:subject:to:references:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=rJ9aJe5i1TofOKmH4lD3ObS5+3E=; b=bQvKuxXjRZx+r3ZNM 1AtC6PFwhTTfhLcQOwyDM29gqfOreOa3GrRDSfN8K9v85HD2DEXXTamXhzn2C6c4 BR+WnkSXD+i82ezwxa1vPl5dODt4lEpIAASC77+brR7uYHrt0tZMkgzLn4+LP7Ug KqaLJkcLxpdwQUN9MCQHuMuR1I= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: nm10-vm5.access.bullet.mail.bf1.yahoo.com X-Yahoo-SMTP: uQK22MWswBCKBpZEmcLDxzBiNtxH7V0FvTGeZikrZyTgdEnV Date: Sun, 19 Apr 2015 16:04:30 -0400 From: Jack Subject: Re: Is there a way to make an existing UNC symbolic link behave like a mount point? To: cygwin AT cygwin DOT com References: In-Reply-To: (from skarr.socrates@gmail.com on Sun Apr 19 08:16:30 2015) Message-Id: <1429473870.25604.0@ffortso4> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t3JK4mlG018058 On 2015.04.19 08:16, Skarr Socrates wrote: > Hi all, > I am experiencing problems with a UNC symbolic link and how it is > interpreted by cygwin. The issue is as below: > > * MachineA is a freebsd server (10.1-RELEASE-p9) with a simple > samba3.6 [homes] share. > * MachineB is a Windows 7 Ultimate, the user "bob" bsd home is not > mapped to a network drive, instead a symbolic link is made under > windows cmd: > > C:\Users\Bob> mklink /D bsdhome \\SOCRATES\bob > > This setup has been working for over 2 years without problems, I > should mention also that Windows 7 sync center is used to keep bob's > freebsd files available even when he is not connected to the server > (not sure if this is relevant at all to the issue). > > Recently, I installed cygwinx64 (CYGWIN_NT-6.1), all went very well, > the link "seem" to be recognized by cygwin. > > bob AT machinea /cygdrive/c/Users/bob $ ls -l > [----cut----] > lrwxrwxrwx 1 bob None XX XX XX XX:XX bsdhome -> //MACHINEB/bob/ > [----cut----] > > The problem I have is how to make cygwin somehow behave consistently > with respect to this link. > > For instance, the bash builtin cd gives: > > bob AT machinea /cygdrive/c/Users/bob/bsdhome $ cd .. > bob AT machinea /cygdrive/c/Users/bob $ > > However, > bob AT machinea /cygdrive/c/Users/bob $ touch file.txt > bob AT machinea /cygdrive/c/Users/bob/bsdhome $ cd bsdhome > bob AT machinea /cygdrive/c/Users/bob/bsdhome $ cp ../file.txt . > cp: cannot stat ‘../file.txt’: No such file or directory > > Trying to do the same thing with windows/DOS cmd.exe works just fine. > > To make sure that windows created symbolic links behaved consistently, > I created with the same process another symbolic link, but in this > case to a directory and not to a network share, and proceeded to do > the same copy. I couldn't reproduce the problem and the process was > successful in cygwin. > > So as far as I came to fixing this problem, I found that cygwin > somehow interprets ".." in the case of a network share symbolic link > is actually pointing to //MACHINEB on the (//) virtual directory, > which made no sense to me as far as symbolic links go and even if it > did why would it work in the case of a normal directory...one too many > slashes? :-) > > I understand the symptoms but I have no clue how to make this work or > if this is a feature or a bug. Is this related to the virtual > directory? can it be disabled? > > I did go through the documentation and googled the life out of me > before posting here, the answer is probably too obvious and I can only > blame my inexperience with cygwin. Perhaps someone has faced a similar > situation, any help or hint would be much appreciated. > > /Socrates. I certainly don't have any definitive information, but I wonder if the issue is whether bash completion handles .. differently from other tools if the directory was reached by cd'ing to a symlink. If you cd to a symklink and then cd .., you get back where you started, but bash completion seems to see the actual parent directory when looking at '..'. I have had similar issues when it's a plain cygwin symlink and no Windows links, shortcuts, or network mounts are involved at all. Jack -- 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