From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11536 invoked by alias); 3 Mar 2020 14:19:59 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 11518 invoked by uid 9078); 3 Mar 2020 14:19:58 -0000 Received: (qmail 11506 invoked by uid 89); 3 Mar 2020 14:19:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.187) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Mar 2020 14:19:56 +0000 Received: from addc1.ad.local.emrich-ebersheim.de ([24.134.13.209]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N95mR-1jTnnK2Jyp-0165vf; Tue, 03 Mar 2020 15:19:53 +0100 Received: from localhost (localhost [127.0.0.1]) by addc1.ad.local.emrich-ebersheim.de (Postfix) with ESMTP id 063AD282853; Tue, 3 Mar 2020 15:19:53 +0100 (CET) Received: from addc1.ad.local.emrich-ebersheim.de ([127.0.0.1]) by localhost (addc1.ad.local.emrich-ebersheim.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SiDhcjsCKOx8; Tue, 3 Mar 2020 15:19:52 +0100 (CET) Received: from [IPv6:2a02:8106:22a:130d:8c81:a787:abfc:8c10] (unknown [IPv6:2a02:8106:22a:130d:8c81:a787:abfc:8c10]) by addc1.ad.local.emrich-ebersheim.de (Postfix) with ESMTPS id 29F4128015E; Tue, 3 Mar 2020 15:19:52 +0100 (CET) Subject: Re: Change in logical link behaviour To: cygwin@cygwin.com References: <30792264-c452-7ea2-c83f-f368322387ea@emrich-ebersheim.de> <20200302164851.GS4045@calimero.vinschen.de> <20200303133925.GA4045@calimero.vinschen.de> Cc: corinna-cygwin From: Rainer Emrich Message-ID: <29f11aed-a529-c88b-af5d-3607f4959871@emrich-ebersheim.de> Date: Tue, 03 Mar 2020 14:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200303133925.GA4045@calimero.vinschen.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wPCWjp7ILExo0QtxBPTlg9pA3nCes8T0R" X-SW-Source: 2020-03/txt/msg00046.txt Message-ID: <20200303143100.mT3j7xDN_dn58GEMRCOEpLVk1vLMSEQxkg5BuZEvKPM@z> --wPCWjp7ILExo0QtxBPTlg9pA3nCes8T0R Content-Type: multipart/mixed; boundary="HqVhkrEadH88uPXNsg1cYKOLLYYzQ5zbS" --HqVhkrEadH88uPXNsg1cYKOLLYYzQ5zbS Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable Content-length: 4090 Am 03.03.2020 um 14:39 schrieb Corinna Vinschen: > On Mar 3 14:17, Rainer Emrich wrote: >> Dear Corinna, >> >> Am 02.03.2020 um 17:48 schrieb Corinna Vinschen: >>> On Feb 29 14:10, Rainer Emrich wrote: >>>> I try to reliably determine if native Windows symlink are working for a >>>> current cygwin environment in a shell script. >>>> [...] >>>> On cygwin 3.1.4 I get: >>>> >>>> >>>> Directory: D:\cygwin\home\rainer\temp >>>> >>>> >>>> Mode LastWriteTime Length Name >>>> ---- ------------- ------ ---- >>>> d---- 29.02.2020 13:58 asdfgh-1 >>>> >>>> So now there is no indication that this is a link. Is this new behavio= ur >>>> intended or a bug? >>>> >>>> I did not try on Windows 10, I'm still on windows 7. >>> >>> I can't reproduce this behaviour. Keep in mind that, [bla] >> I know all the implications. I have to test in an unknown cygwin >> environment if it is possible to set native symlinks. >>> >>> So, on Windows 7 in an elevated shell: >>> >>> # id -G | grep -Eq '\<544\>' && echo elevated || echo non-elevated >>> elevated >>> # uname -a >>> CYGWIN_NT-6.1 vmbert764 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygw= in >>> # mkdir qwe >>> # cd qwe >>> # export CYGWIN=3D"winsymlinks:nativestrict" >>> # touch foo >>> # ln -s foo bar >>> # cmd /c dir /a >>> Volume in drive C has no label. >>> Volume Serial Number is A8E0-A24E >>> >>> Directory of C:\cygwin64\home\corinna\qwe >>> >>> 2020-03-02 17:31 . >>> 2020-03-02 17:31 .. >>> 2020-03-02 17:31 bar [foo] >>> 2020-03-02 17:31 0 foo >>> 2 File(s) 0 bytes >>> 2 Dir(s) 7.907.352.576 bytes free >>> >> Yes, this is the same for me, but if you use the powershell >> >> # powershell "& {Get-Item -Path bar | Select-Object}" >> >> on cygwin 3.0.7 you get >> >> Directory: D:\cygwin\home\rainer\temp >> >> Mode LastWriteTime Length Name >> ---- ------------- ------ ---- >> -a---l 03.03.2020 14:09 0 bar >> >> and on cygwin 3.1.4 you get >> >> Directory: D:\cygwin\home\rainer\temp >> >> Mode LastWriteTime Length Name >> ---- ------------- ------ ---- >> -a--- 03.03.2020 14:09 0 bar >> >> >> The only difference is the used cygwin version. So, I don't understand >> what has changed. >=20 > Nothing has changed in terms of symlink handling. Are you saying that > `cmd /c dir /a' shows >=20 > 2020-03-03 14:21 bar [foo] >=20 > but powershell shows >=20 > -a--- 03.03.2020 14:21 0 bar >=20 > for the same file? That would be most puzzeling but certainly outside > of Cygwin's control. >=20 > So I created a symlink again on W7 with Cygwin 3.1.4 and `export > CYGWIN=3Dwinsymlinks:nativestrict', and tried with cmd *and* powershell > (which I usually don't touch) and I see >=20 > # uname -a > CYGWIN_NT-6.1 vmbert764 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin > # setenv CYGWIN winsymlinks:nativestrict > # ln -s foo bar > # cmd /c dir /a bar > Volume in drive C has no label. > Volume Serial Number is A8E0-A24E >=20 > Directory of C:\cygwin64\home\corinna\qwe >=20 > 03.03.2020 14:30 bar [foo] > 1 File(s) 0 bytes > 0 Dir(s) 7.929.241.600 bytes free > # powershell "& {Get-Item -Path bar | Select-Object}" >=20 >=20 > Directory: C:\cygwin64\home\corinna\qwe >=20 >=20 > Mode LastWriteTime Length Name > ---- ------------- ------ ---- > -a--- 03.03.2020 14:30 0 bar >=20 > Aha! So powershell does not show the 'l'. The most important thing is the difference between cygwin 3.0.7 and cygwin 3.1.4. For cygwin 3.0.7 the link indicator is shown even in powershell on Windows 7 but not with cygwin-3.1.4. And believe me, the only difference is the cygwin version. Rainer --HqVhkrEadH88uPXNsg1cYKOLLYYzQ5zbS-- --wPCWjp7ILExo0QtxBPTlg9pA3nCes8T0R Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEQq4BT9NfW50eSlCTkX2ILOIqatIFAl5eZ4IACgkQkX2ILOIq atJr/Q/6As1R+l/AU4Vv9SkWAnAJjGRcJMQxePrtpRILPlaRYpAHy3vqOo/xmGJ2 WsXObSPDxBO9FnaKfbZ+YxXsm7+IbPznkzgQGdwCeR8zB28FVZn8Kr/c0i25cAk7 bMPBhuFsPJ9Q3ZEYDxhGkThtZad/2utd5tqp2SWCJDbM7w2IEM6tGAZIGxTace2f STaKHFzdi0OpnVNwwCElqxGM34U7sZ2LqBaw3b3TQk8DD5k+tpF2x2HyblIQQevT hEyYlzaVCmzl985KY/uZGHZ3wNLjIoQkNzf7Kht3FPwMxR+zKA0bnDGF/+DUDaQ0 Csg0l+nYAXKAuAGGUDAb0i8zKvxpgsX2vKFJdBFOej76VeVIzLGali4H9gfCE2Gz Dd/GyikNiXuVUuVqjdNXWKK/bPFs011zwnZhqsExHxltlsOFHiYTkZrSiildTy52 rJQoJVJjhuKvs9wWgs8lsiL9TDR2yUMrGauTQJE8Bc1U7v6+MjOTbfRIVtwsod1E WEKVPkGla4CSMfpr+U3I5SSc/nkmo/6euT5VAq68KAXEP5nEJy9AeeRDffW+IsWh bTvZl8R2xx8EgSDRc9FhNVUuDXlKn/7y9k5VCaDhqjz9n2HadNhk4hrpYD3cksIg 5GTwVJNLm9KSHDR2n+5N5bHc5NvunUGFL4LW6y0v5+CxwvsLX+0= =m2eb -----END PGP SIGNATURE----- --wPCWjp7ILExo0QtxBPTlg9pA3nCes8T0R--