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:from:subject:to:message-id:date:mime-version :content-type; q=dns; s=default; b=UTeuzqmQxGt6+dRqN54VjKUmsFM8f rcpuaZdVc+A6EhitqxxmbJ2f8qLwUFxYtWqCCdNG2VnS+Y6OZhv6zBFIt3zgO46V Pr25NKsdYiYBUUlJVAYOHeobo3B4HYaCUXJ1E0/PHr4yHbP1mVFKK4R/pW4CyvsR I8Xv9LphJhfcYk= 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:from:subject:to:message-id:date:mime-version :content-type; s=default; bh=N1m3X3HfnVkSVVafQ17Jt6xLVK8=; b=ceQ EayVkcpdjSJIioLl0q/nOiJIXSF7sr3Srssmr4Un69622uWmMys/VQFwq8j/kUhm vEqzSm8LmHXNtQ8PePNxOdN3QniLNf1W/8yB4FxrNkjWTTLycz5Ol1qUSwJn7V5g 1KhRnmF8Bbjj8xbUQd+lnUKAtRumW2AoIy6Lhllc= 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: Yes, score=5.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: forward13.mail.yandex.net Authentication-Results: smtp14.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US From: "Mingye Wang (Arthur2e5)" Subject: 2.2.1: NTFS directory symlinks handling To: cygwin AT cygwin DOT com Message-ID: <55D7C3E0.3020703@aosc.xyz> Date: Sat, 22 Aug 2015 08:35:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Thunderbird/40.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MLiUxIJX4vSiWigLUXPE1SgJxkWmuSBAR" --MLiUxIJX4vSiWigLUXPE1SgJxkWmuSBAR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable It is known that cygwin has a naive interpretation for NTFS symlinks, by translating those paths directly. This works fine with most cases, but when you link stuffs under `/` to somewhere like `../cygwin/home`, it simply breaks. I have a directory tree like this: |- cygwin/ |- home/ |- Arthur/ |- .gnupg/ (mklink /D .gnupg \Users\Arthur\Appdata\Roaming\gnupg) |- .ssh/ (mklink /D .ssh \Users\Arthur\.ssh) |- tmp/ |- 1.txt |- cygwin64/ |- tmp@ (mklink /D tmp ..\cygwin\tmp) |- home@ (mklink /D home ..\cygwin\home) It appears that those `.gnupg` and `.ssh` with an absolute path to the drive root was interpreted correctly, like `/cygdrive/c/Users/Arthur/.ssh`, but cygwin64's /tmp and /home breaks, with the following manner described: 1. Directly interacting with those paths, like attempting a `cd` into them, cause 'File not found' errors. Running `ls --color` on them gives a cyan color of it, but doesn't list their contents. 1. `readlink -n /tmp` gives naively translated paths like `../cygwin/tmp` which I believe what cygwin is using. Adding an extra link like `ln -s /cygdrive/c/cygwin` fixes this, by making that `/../cygwin` available. 2. bash also does some startup checking and warns me about '/tmp missing'. 2. Operations like reading the contents of those directories are not affected. For example, `cd` into `/home/Arthur` and running `cat` on `/tmp/1.txt`. `ls` works, too. --=20 Regards, Arthur2e5 --MLiUxIJX4vSiWigLUXPE1SgJxkWmuSBAR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJV18PhAAoJEK4jzpUiLXvaMSYP/2Fi4zLEEo1rdhVLlBjDVWjy shJCjYIdJtSvfPNoOrHZDQAYF2/bCQmwkCVOP//3i8rf9+ctwKp/wgkai121MXwy VLLVxTV0wX8ny48t6gIZbUYyWo3rD9lPoh4/k3garl+mP1eO6Q6U1qwc+jnT+lAL adrwmRy0SgVfk7/QyZp4mOca+5hJz/Ii4Ih5w5TERca/vmzIF8b2hGlUm9GChK0R 4Rlh91Gs1Ef6STvZq54UH0GJ1+Kh1IOApey2Bhqi3R9g6qElGplJp+VPDXgDxFNc 2rP7fveG+IZmlrFnkIP8PRsFWw5G/KaJ3sxEeGTahqxCR18Y6z8jkkwhquYMPid3 RJCoPdNZQLmG3uZTOjnYihP8/+okjgguvt2GfYQ0B+fmHquu+8WAtKILXvzAZi5+ 7krHxzTFCVtBBsm9q5xlhuuI+7PT8TactQRMXd8D5S3BaktOf5L6G22W9TO2JlcI iYGOMU1PAxQynSvsZyEtZImhF2PANCt2AUprXa9F3hIj03JY5qnxouqsVvVNVt3O AC1NmcV1yyqn8115BlkalboYMkpHx5TJAibbTdwuZH7eNKSvd8CLK/MoTtFZggHp tBeau5QZ0Ayaj6RX4mGYTGrefQ9PLix/JSN3zMLqQ50wiCCckFubqKJvtzdhyWET 8S+H/fsobhyVULuNcNoy =fS2n -----END PGP SIGNATURE----- --MLiUxIJX4vSiWigLUXPE1SgJxkWmuSBAR--