delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/05/25/03:53:56

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8E223857713
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1685001192;
bh=pGMnJzrQ92b2h/7GX4bsws9Z9oDUz3ODS9jHqN2LdjU=;
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=dny1JBX6qrbDlPWqcF4Qv+PoGhIuew2mjwvIuBg5AWwJ+/US9HHXfU9cG7jYOUCyr
tEOQIRfW2WFOI9CEzU3zG2zWqK6VA8/kxhxfMSvJFsx6FNw6QN6V71H3714biioEl8
x0M6GMZRwBJxP3c2SEhkBU40YZGJ8yGEZVMtNBWQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E95983858422
X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=646f13d8
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
a=IkcTkHD0fZMA:10 a=7392p9bmP1SmsWvOWsUA:9 a=QEXdDO2ut3YA:10
Message-ID: <e7f8d797-3d76-be8c-c9ad-7c97b696e4af@Shaw.ca>
Date: Thu, 25 May 2023 01:52:55 -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>
Organization: Inglis
In-Reply-To: <A666F534-16CB-47FE-A6A9-A9DFDE47E642@Denis-Excoffier.org>
X-CMAE-Envelope: MS4xfDJvL4t9E4Dz33pMHbT/ITSFbRs3o+Ls8kxvx5688FXMBKp+t6Czabf6h7m/XWM/jpdCMXsWO2MvO8A9JRZOGTfhmX4WqShgMFQ8cuD73V5wRlPrav9F
aSk5tJq+pk0P2bkMFCMPHQ/ls3XvxWiV7yoq/sSf1vTQuDCFPzi7KsG+/ZfGEw09ViAHFQa/Bb9z8g==
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,
RCVD_IN_MSPIKE_H2, 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>
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 34P7rbnr021054

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.

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019