Subject: Re: Directory permissions on 1.1 i386 directories on ftp.NetBSD.ORG
To: None <current-users@NetBSD.ORG>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: current-users
Date: 12/02/1995 16:16:24
>> dr-xr-xr-x  11 234  netbsd    512 Nov 26 20:29 binary
>> dr-xr-xr-x   2 234  netbsd    512 Nov 26 18:20 floppies
>> dr-xr-xr-x   4 234  netbsd    512 Nov 26 19:46 security
>> dr-xr-xr-x   2 234  netbsd    512 Nov 26 18:12 utils
>> 
>> The i386 directories (dunno about the others) don't have write
>> permission for the owner.  So if you go up to pub/NetBSD and go a
>> "get NetBSD-1.1.tar.gz" [...], you'll end up with a (humongous (-: )
>> tar ball that barfs if you try to extract it as a mere-mortal non-root
>> user, when it goes to create the files that live under these
>> directories.
> 
> If so, this is a bug in the tar being used to extract it.

Both the Solaris 2.4 "tar" (the one in question) and the SunOS 4.1.4 "tar"
exhibit this behavior.

rushmore:1:35 [/home/gke/public_html/NetBSD/1.1] % uname -a
SunOS rushmore 5.4 Generic_101945-27 sun4m sparc

rushmore:1:36 [/home/gke/public_html/NetBSD/1.1] % gzcat 
/export/vicar/temp/NetBSD-1.1.tar.gz | tar -xvpf - NetBSD-1.1/i386
x NetBSD-1.1/i386, 0 bytes, 0 tape blocks
x NetBSD-1.1/i386/utils, 0 bytes, 0 tape blocks
tar: NetBSD-1.1/i386/utils/README.files - cannot create
tar: NetBSD-1.1/i386/utils/os-bs135.exe - cannot create
...
x NetBSD-1.1/i386/INSTALL, 73611 bytes, 144 tape blocks
x NetBSD-1.1/i386/binary, 0 bytes, 0 tape blocks
tar: NetBSD-1.1/i386/binary/CKSUMS - cannot create
...
tar: NetBSD-1.1/i386/binary/base11: Permission denied
... ad nauseum ...

Clearly it's doing the chmod'ing on the fly before extracting the next file.

So if it's a "bug" in the "tar that's used to extract it", I suspect it's
rather a ubiquitous one.

Anyway, I've solved my problem with it by extracting as "root" and chown -R'ing
the tree afterwards.  Other folks might not have that luxury.  The folks at
Warped have changed the permissions (thanks).

	- Greg