Is there a way to make an existing UNC symbolic link behave like a mount point?
Jack
ostroffjh@users.sourceforge.net
Sun Apr 19 20:04:00 GMT 2015
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@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@machinea /cygdrive/c/Users/bob/bsdhome $ cd ..
> bob@machinea /cygdrive/c/Users/bob $
>
> However,
> bob@machinea /cygdrive/c/Users/bob $ touch file.txt
> bob@machinea /cygdrive/c/Users/bob/bsdhome $ cd bsdhome
> bob@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
More information about the Cygwin
mailing list