inside /bin/tar: cannot change mode
Brian Inglis
Brian.Inglis@Shaw.ca
Thu May 25 07:52:55 GMT 2023
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
More information about the Cygwin
mailing list