Mail Archives: cygwin/2012/10/03/20:34:11
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=3.3 required=5.0 tests=AWL,BAYES_50,RCVD_IN_HOSTKARMA_NO,TW_XP
|
X-Spam-Check-By: | sourceware.org
|
To: | cygwin AT cygwin DOT com
|
Cc: | briarpatch1337 AT gmail DOT com
|
MIME-Version: | 1.0
|
Subject: | SMB symlink compatibility between Cygwin, Windows XP, and Windows 7
|
X-KeepSent: | 668BFDD7:DC89B3A3-86257A8D:0002E8CF; type=4; flags=0; name=$KeepSent
|
From: | Brian Alexander <brian DOT alexander AT ni DOT com>
|
Message-ID: | <OF668BFDD7.DC89B3A3-ON86257A8D.0002E8CF-86257A8D.00031B06@ni.com>
|
Date: | Wed, 3 Oct 2012 19:33:55 -0500
|
X-Proofpoint-Virus-Version: | vendor=fsecure engine=2.50.10432:5.7.7855,1.0.431,0.0.0000 definitions=2012-10-03_06:2012-10-03,2012-10-03,1970-01-01 signatures=0
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
I have run into an issue when trying to create a symlink/shortcut to a
network share (SMB) that will work between Cygwin, Windows XP, and Windows
7.
If you set the environment variable CYGWIN=winsymlinks, you get the
benefit that ln -s will create files that work as both Windows shortcuts,
and Cygwin symlinks. (Awesome!)
It seems like compatibility is broken between Windows 7 and Windows XP
when it comes to these network links.
My setup:
xpbox is a computer running Windows XP, with cygwin installed,
CYGWIN=winsymlinks
win7box is a computer running Windows 7, with cygwin installed,
CYGWIN=winsymlinks
fileserver is a SMB file server, with shares called "share1" and "share2"
Here is my sequence of commands that leads to my problem:
On xpbox in a cmd window:
net use \\fileserver\share1 /user:domain\username
net use \\fileserver\share2 /user:domain\username
On xpbox in a cygwin terminal:
mkdir //fileserver/share1/folder1
ln -s //fileserver/share1/folder1 //fileserver/share2/link1
Now, when I open up \\fileserver\share2 on xpbox, I see a working shortcut
called "link1" that gets me to \\fileserver\share1\folder1
If I run ls -l //fileserver/share2 in Cygwin, I see that Cygwin recognizes
the link.
If I open up \\fileserver\share2 on win7box though, "link1" is a
non-working shortcut.
More weirdness:
On xpbox in a cygwin terminal:
ln -s //fileserver/share1 //fileserver/share2/link2
link2 is recognized by Windows and Cygwin on both computers.
On win7box in a cygwin terminal:
ln -s //fileserver/share1 //fileserver/share2/link3
ln -s //fileserver/share1/folder1 //fileserver/share2/link4
link3 is not recognized by Windows XP, but works in Windows 7 and Cygwin
on both computers.
link4 is not recognized by Windows XP, but works in Windows 7 and Cygwin
on both computers.
If I use mkshortcut, instead of ln, then the shortcuts work on both
Windows computers, but Cygwin does not recognize the link.
This seems like a compatibility bug in the way Cygwin is making the binary
.lnk files. I haven't had time to look at source code, but that will be
my next step in figuring this out.
Anyone have any other ideas of how to make a shortcut to a SMB path that
will work in both Windows XP and Windows 7, and is also traversable by
cygwin?
Thanks,
Brian Alexander
--
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
- Raw text -