From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by sourceware.org (Postfix) with ESMTPS id 2E5ED3844046 for ; Sun, 4 Oct 2020 10:35:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2E5ED3844046 Received: from mxback28o.mail.yandex.net (mxback28o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::79]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 2BBAF598070A; Sun, 4 Oct 2020 13:35:00 +0300 (MSK) Received: from iva5-057a0d1fbbd8.qloud-c.yandex.net (iva5-057a0d1fbbd8.qloud-c.yandex.net [2a02:6b8:c0c:7f1c:0:640:57a:d1f]) by mxback28o.mail.yandex.net (mxback/Yandex) with ESMTP id Thd1iTNY9t-Z0QqJMhH; Sun, 04 Oct 2020 13:35:00 +0300 Received: by iva5-057a0d1fbbd8.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 51J4rrxKyU-YxmmCnfc; Sun, 04 Oct 2020 13:34:59 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Sun, 04 Oct 2020 10:28:01 -0000 Date: Sun, 4 Oct 2020 13:28:01 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <1379483951.20201004132801@yandex.ru> To: vinay Hegde , cygwin@cygwin.com Subject: Re: Problem with tar version 1.29 (in Cygwin 3.6 64 bit) in extracting sym-link files In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 10:35:04 -0000 Greetings, vinay Hegde! Please no top-posting in this list. > On Fri, Oct 2, 2020 at 9:13 PM Eliot Moss wrote: >> >> On 10/2/2020 11:26 AM, vinay Hegde via Cygwin wrote: >> > Hi Cygwin Team, >> > In Cygwin 3.6, I am facing an issue while using tar.exe for extracting >> > .tar.z file. >> > >> > Issue summary: >> > When I use 'tar.exe' to extract the .tar.z file, it extracts all files >> > including symlinks. But symlink file size will be 0KB & it throws >> > error 'The file cannot be accessed by the system', if I try to open in >> > any Windows editor like notepad or notepad++ >> > >> > Below are the details: >> > - OS: Windows 2019 >> > - Cygwin version installed: 3.6 (tar version: 1.29) >> > - Command used to extract the tar file is: tar -zxvf jre64.tar.Z >> > - 'ls -l' on the extracted directory shows: >> > lrwxrwxrwx 1 etbuild Domain Users 8 Jul 10 2017 ControlPanel -> jcontrol >> > -rwxr-xr-x+ 1 etbuild Domain Users 7734 Mar 15 2017 java >> > -rwxr-xr-x+ 1 etbuild Domain Users 128791 Mar 15 2017 javaws >> > -rwxr-xr-x+ 1 etbuild Domain Users 6264 Mar 15 2017 jcontrol >> > >> > - As you can see 'ControlPanel' is a symlink file with 0KB >> > (8Bytes) size. This file, I cannot open in any Windows editor. It >> > throws error like ''The file cannot be accessed by the system' >> > >> > - However, I can open this file in vi editor or I can 'cat' this. >> > >> > - Earlier, I was using Cygwin version 1.7 (tar version: 1.27) & in >> > that, this issue was not there. Symlink file size was 1KB & I could >> > open it with any Windows editor. >> > >> > Please suggest what needs to be done to fix this issue. >> >> Hi, Vinay - Cygwin can use, and create, a variety of forms of links. Some of these are understood >> by Windows tools, some not. I suggest you read in the Cygwin documentation about symlinks and >> decide what kind are best for you. Then you'll need to set that up, delete the existing link, and >> re-create it. I personally run with CYGWIN=winsymlinks:native, but as we say in Internet land, YMMV. >> > Hi Eliot Moss, > Thank you very much for the quick response & the information.It really helped. > I just set 'CYGWIN=winsymlinks:lnk' & I am now able to open sym-link > file. Both 'CYGWIN=winsymlinks:lnk' & 'CYGWIN=winsymlinks' are working > for me. > But it creates a shortcut(not the regular file). Hope it won't impact > my existing setup. > But both 'CYGWIN=winsymlinks:native' (which is default I believe) & > 'CYGWIN=winsymlinks:nativestrict' are not working for me. Just to > understand, In what OS environment/File System 'native' will work? Given enough permissions, "native" will work everywhere, it will create native symlink, but failing that, it will fall back to creating Cygwin link. LNK is an Explorer shortcut, which would work with many programs outside Cygwin, but not necessarily with your one. See https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks as well as https://cygwin.com/cygwin-ug-net/using-cygwinenv.html -- With best regards, Andrey Repin Sunday, October 4, 2020 7:47:13 Sorry for my terrible english...