This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Does anyone know why tar doesn't like "./" at the start of files?


> > > > Does anyone know why tar doesn't like "./" at the start of files?
> > > > I can't get Pine to extract, because the files are prefixed with "./":
> > > What happens if you `tar -Pxvzf /d/zip/pine4.21.tar-2.gz'?
> >
> > I get the same output:
> >
> > Mon Nov 13-17:36:33 / 506$ tar Pxvzf /d/zip/pine4.21.tar-2.gz
> > ./pine4.21/
> > tar: ./pine4.21: Could not create directory: No such file or directory
>
>  I couldn't find a copy of pine4.21 but pine4.30 has the
>  same layout and it works fine for me (tar 1.13) .  What
>  version of tar are you using? You do have write permission
>  to the current directory don't you?

It seems to extract OK if I'm not in the "/" root directory!

It works if I'm in "/tmp" (a "textmode" mounted link to d:\temp) or a new subdirectory under "/".

Both "/" and "/tmp" are "drwxr-xr-x"! Both are owned by me.

I get an error if I'm in "/" and do a "ls -ld ./tmp" (search here for "-->"!

Perhaps there's some weired NT "cacls" going on?

There is a difference in NT permissions, that is not displayed by "ls -l":

    Tue Nov 14-10:47:32 / 578$ cacls d:\\cygwin <-- can't extract here
    d:\cygwin CREATOR OWNER:(OI)(IO)F
              CREATOR OWNER:(CI)F
              Everyone:(OI)(IO)F
              Everyone:(CI)F

    Tue Nov 14-10:47:48 / 580$ cacls temp       <-- can extract here
    d:\cygwin\temp CREATOR OWNER:(OI)(IO)F
                   BUILTIN\Administrators:F
                   CREATOR OWNER:(CI)(IO)F
                   Everyone:(OI)(IO)F
                   Everyone:F
                   Everyone:(CI)(IO)F

    Tue Nov 14-10:47:39 / 579$ cacls d:\\temp   <-- can also extract here
    d:\temp Everyone:F
            Everyone:(OI)(CI)(IO)F

Session output follows:
-----------------------

Listing of root:

    Tue Nov 14-10:27:32 / 499$ la
    total 286
    -rw-r--r--   1 boekhoff None         3199 Thu Jun 22 17:11:34 2000 READMEopengl-1.2.1-1.txt
    drwxr-sr-x  25 boekhoff None        24576 Thu Jul 20 18:53:38 2000 cdrecord-1.9/
    drwxr-xr-x   3 boekhoff None            0 Tue Nov 07 17:56:54 2000 home/
    drwxr-xr-x   3 boekhoff None            0 Tue Nov 07 17:57:02 2000 opt/
    drwxr-xr-x   7 boekhoff None         4096 Tue Nov 07 17:58:00 2000 gnuchess-4.0.pl77/
    drwxr-xr-x  19 boekhoff None         8192 Tue Nov 07 17:58:29 2000 ncurses-5.1/
    drwxr-xr-x   4 boekhoff None            0 Tue Nov 07 17:58:54 2000 var/
    drwxr-xr-x   2 boekhoff None            0 Thu Nov 09 10:46:40 2000 sbin/
    drwxr-xr-x   2 boekhoff None        57344 Thu Nov 09 10:46:41 2000 bin/
    drwxr-xr-x   4 boekhoff None        45056 Thu Nov 09 10:46:42 2000 lib/
    drwxr-xr-x  16 boekhoff None         4096 Thu Nov 09 10:46:42 2000 usr/
    drwxr-xr-x   4 boekhoff None         4096 Thu Nov 09 10:46:42 2000 etc/
    drwxr-xr-x  29 boekhoff None       368640 Thu Nov 09 16:24:43 2000 perl-5.6.0-RC1/
    drwxr-xr-x   2 boekhoff None        57344 Tue Nov 14 10:29:08 2000 tmp/
    drwxr-xr-x  15 boekhoff None         4096 Tue Nov 14 10:32:25 2000 ./
    drwxr-xr-x  15 boekhoff None         4096 Tue Nov 14 10:32:25 2000 ../

Who am I:

    Tue Nov 14-10:27:36 / 500$ whoami
    boekhoff_m

    Tue Nov 14-10:27:41 / 501$ id
    uid=1878(boekhoff_m) gid=513(None) groups=513(None),513(None)

Try extracting at "/":

    Tue Nov 14-10:32:27 / 529$ tar xvzf /d/zip/pine4.21.tar-2.gz
    ./pine4.21/
    tar: ./pine4.21: Could not create directory: No such file or directory
    ./pine4.21/CPYRIGHT
    tar: ./pine4.21/CPYRIGHT: Could not create file: No such host or network path
    ./pine4.21/README
    tar: ./pine4.21/README: Could not create file: No such host or network path
    ...

Try extracting at "/tmp":

    Tue Nov 14-10:33:32 / 530$ pu /tmp
    /tmp /

    Tue Nov 14-10:33:54 /tmp 531$ tar xvzf /d/zip/pine4.21.tar-2.gz
    ./pine4.21/
    ./pine4.21/CPYRIGHT
    ./pine4.21/README
    ./pine4.21/bin/
    ./pine4.21/build
    ./pine4.21/build.cmd
    ./pine4.21/contrib/

Listing of "/tmp":

    Tue Nov 14-10:39:38 /tmp 560$ la
    total 4264
    -rw-r--r--   1 boekhoff None       570556 Fri Nov 03 16:47:22 2000 t_cbaakj.tmp
    -rw-r--r--   1 boekhoff None       570556 Fri Nov 03 16:47:22 2000 t_eaaakj.tmp
    ...
    drwxr-xr-x   2 boekhoff None        57344 Tue Nov 14 10:35:24 2000 ./
    drwxr-xr-x  15 boekhoff None         4096 Tue Nov 14 10:37:31 2000 ../

Curious behaviour of "ls":

    Tue Nov 14-10:42:57 / 566$ mkdir temp

    Tue Nov 14-10:43:10 / 567$ ls -ld ./temp

--> ls: ./temp: No such file or directory

    Tue Nov 14-10:43:14 / 568$ ls -ld temp

    drwxr-xr-x   2 boekhoff None            0 Nov 14 10:43 temp

    Tue Nov 14-10:43:18 / 569$ pu /tmp

    /tmp /

    Tue Nov 14-10:43:20 /tmp 570$ mkdir temp

    Tue Nov 14-10:43:23 /tmp 571$ ls -ld ./temp

    drwxr-xr-x   2 boekhoff None            0 Nov 14 10:43 ./temp

    Tue Nov 14-10:43:26 /tmp 572$ ls -ld temp

    drwxr-xr-x   2 boekhoff None            0 Nov 14 10:43 temp




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]