delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 58560385842A |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1685082499; | |
bh=96C9vIU7OcGUmgQysPdYXEsGp7DnsmCw9Bfqi1hZPDU=; | |
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
From; | |
b=V0YKQqHL1WbmliWBnDgmDzMqTSC99t1IGlyrCxb13btXiR/psZQ0GYdANHh1SBHce | |
FD5pmp4y+JdrTiqGEoidwEd/g4KQdD3mQ2hiq7ZqbDqVnF99CkLCD6od5E4GeFVKm9 | |
LeWFad9el+un6wqjajrt0sjr0IDwS6pOJ+feYdiQ= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 679733858D39 |
X-Authority-Analysis: | v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=6470515d |
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 | |
a=IkcTkHD0fZMA:10 a=-7w5etsKZ0zncjsnIVgA:9 a=QEXdDO2ut3YA:10 | |
Message-ID: | <e2873a47-7a82-47f3-e57c-ccb013afaac8@Shaw.ca> |
Date: | Fri, 26 May 2023 00:27:40 -0600 |
MIME-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 |
Thunderbird/102.11.0 | |
Subject: | Re: inside /bin/tar: cannot change mode |
To: | cygwin AT cygwin DOT com |
References: | <A666F534-16CB-47FE-A6A9-A9DFDE47E642 AT Denis-Excoffier DOT org> |
<e7f8d797-3d76-be8c-c9ad-7c97b696e4af AT Shaw DOT ca> | |
<51B86F63-E8BC-492B-BC5F-8704B164FB17 AT Denis-Excoffier DOT org> | |
Organization: | Inglis |
In-Reply-To: | <51B86F63-E8BC-492B-BC5F-8704B164FB17@Denis-Excoffier.org> |
X-CMAE-Envelope: | MS4xfHpk/VisvYBUh8X6XFZViC6St2kN36ckRs680OIYNRzxUm7Cb+WNMAN8Lg8CABCGuwJh4PuidKFVTmYIxVgOp/xMhJuwuxdiISA569loeqrvLHEO46bl |
464CyJnMpzhTV4q32SjsYEbGgmQ1AOzUJVnKHyQELpHCNvfoAPcPBkwZrI4bWRTTKH2PYyA+RejuKpyPBY0lODVqr2DMWQmRseAkFPmkIn6knSZ7qkwGoxYn | |
X-Spam-Status: | No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, |
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, | |
SPF_HELO_NONE, SPF_PASS, TXREP, | |
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.6 (2021-04-09) on |
server2.sourceware.org | |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
From: | Brian Inglis via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
Cc: | Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>, |
Denis Excoffier <cygwin AT Denis-Excoffier DOT org> | |
Errors-To: | cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com |
Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 34Q6SfcP024468 |
On 2023-05-25 22:52, Denis Excoffier wrote: >> On 2023-05-25 09:52, Brian Inglis via Cygwin wrote: >> On 2023-05-24 12:18, Denis Excoffier via Cygwin wrote: >>> I have an error (about symlinks it seems) that i have never met in years: Cannot change mode. >>> Apart from this message (and return code != 0), the ?tar extract? is ok. >>> % uname -a >>> CYGWIN_NT-10.0-17763 {edited} 3.5.0-0.295.g3bee68248fc8.x86_64 2023-05-01 17:58 UTC x86_64 Cygwin >>> % cd /tmp; rm -rf mytest mytest.tar >>> % mkdir mytest >>> % ln -s b mytest/a >>> % /bin/tar cf /tmp/mytest.tar mytest >>> % /bin/tar tvf /tmp/mytest.tar >>> drwxr-xr-x {edited}/{edited} 0 2023-05-24 13:12 mytest/ >>> lrwxrwxrwx {edited}/{edited} 0 2023-05-24 13:12 mytest/a -> b >>> % rm -rf mytest >>> % /bin/tar xf /tmp/mytest.tar >>> /bin/tar: mytest/a: Cannot change mode to rwxr-xr-x: Not a directory >>> /bin/tar: Exiting with failure status due to previous errors >>> % echo $status >>> 2 >>> % >>> /tmp is under ntfs filesystem, all packages are up to date (e.g. /bin/tar --version is 1.34). >> I recently got this during a package update build, when it decided to tar a >> build directory, which contained only symlinks to files in the src directory, >> which the tar did not include, which would have created many dangling symlinks. >> I fixed the issue by adding -h, --dereference to give chf and tar real files. Sorry I failed to make my meaning clear. The issue may be that tar can not apply file permissions to a symlink target which does not (yet) exist in the filesystem. > I don’t catch this. A symlink, dangling or not, is a normal file. In any case, the problem is the > same if the symlink target is a member in the archive. See for example > % mkdir -p /tmp/mytest2; cd /tmp/mytest2 > % tar xf cygwin-devel-3.5.0-0.295.g3bee68248fc8.tar.xz > /bin/tar: usr/lib/libg.a: Cannot change mode to rwxr-xr-x: Not a directory > /bin/tar: Exiting with failure status due to previous errors What is .../libg.a in the tar file; is it a symlink link or target? > I add that my symlinks are default ones, i.e. JUNCTIONS. What is your CYGWIN=winsymlinks:... setting: native or nativestrict? I have no idea how tar is likely to view or handle a Windows junction, especially if it has not yet been created! The *default* symlinks are *sys*: "CYGWIN=winsymlinks:{lnk,native,nativestrict,sys} If set to just winsymlinks or winsymlinks:lnk, Cygwin creates symlinks as Windows shortcuts with a special header and the R/O attribute set. If set to winsymlinks:native or winsymlinks:nativestrict, Cygwin creates symlinks as native Windows symlinks on filesystems and OS versions supporting them. The difference between winsymlinks:native and winsymlinks:nativestrict is this: If the filesystem supports native symlinks and Cygwin fails to create a native symlink for some reason, it will fall back to creating Cygwin default symlinks with winsymlinks:native, while with winsymlinks:nativestrict the symlink(2) system call will immediately fail. If set to winsymlinks:sys, Cygwin creates symlinks as plain files with the system attribute, containing a magic cookie followed by the path to which the link points. Note that this setting has no effect where Cygwin knows that the filesystem only supports a creating symlinks in a specific way. For more information on symbolic links, see the section called “Symbolic links”. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright 2019 by DJ Delorie | Updated Jul 2019 |