[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tar extraction: Member name contains `..'

From: Fred Ma
Subject: Re: Tar extraction: Member name contains `..'
Date: Mon, 19 Jul 2004 17:12:23 -0400

Eli Zaretskii wrote:
> > From: Fred Ma <address@hidden>
> > Newsgroups: gnu.utils.help,gnu.utils.bug
> > Date: 18 Jul 2004 22:33:27 GMT
> >
> > I've been googling and google-grouping the gnu tar problem
> > where file extraction generates the error message:
> >
> >    Member name contains `..'
> >
> > It seems like one can capture files with paths having "..", but not
> > extract them.
> It could well be a bug in the Cygwin port of Tar.
> > I am using version 1.13.25 on Cygwin, but this problem
> > seems to be many years old, and span many target OS's.
> I doubt that.  1.13.25 is quite new (1.14 was released in May this
> year), and I cannot find this string in Tar 1.12.

I googled the error message two different ways.  It seems to be
commonplace, going back years, and over several platforms (e.g.

> >    1. Explicitly disallow the inclusion of such files in the tar file
> >       through the use of an informative error message, and don't
> >       bother using up the bytes to embed such a file in the tar
> >       archive (since it can't be retrieved anyway).
> >
> >    2. Allow the inclusion of such files with a warning.  Warn of the
> >       presence of such files in the extraction, and do not extract
> >       them by default.  But do allow this default to be overridden.
> Can you explain why this is a problem?  I don't see why having two
> dots in a row in a file name would prevent it from being extracted,
> including on Windows.

The problem is that files starting with '..' can be archived, but not
extracted.  I can certainly see why the developers would disallow
their extraction, as it would be too easy to inadverdently cause
changes outside of the directory from which the user is issuing the
extraction.  Perhaps the user could be informed at the time of
creating the archive that some files will not be extractable.  Then
the user can take measures to archive the desired files in a
retrievable manner.  There is no point archiving nonretrievable files,
so perhaps they could just be left out, thus making the archive smaller.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]