Subject: solved: on the fly compression but there're new problems

From: [email-masked]
Date: Wed, 7 Oct 1998 10:51:58 +0300

Hi,

Thanks everybody for help!

I solved my problems :-) but i got new ones :-(
I found a letter in the wu-ftpd conference archive
where there's a full answer on my question.
Thanks to Alain Magloire.
I corrected my ftpconversions file and created symbolic
links in /bin for gzip and tar.
Besides I included  his message at button of this letter.

About new problems. I'm sorry I can't understand
what I should do to upload files with on the fly decompression?
Next one, when I got files with on the fly compression by gzip
and run: gunzip -v test.tar.gz, I see: "decompression OK. trail garbage
ignored".
Why does it happen?

Help me please.
Thanks.

Sincerely,
Alexander Velichko.

Below is include message:
____________________________________________________
Re: WU-FTP on OSF1

Alain Magloire ([email-masked])
Tue, 17 Sep 1996 13:08:50 -0400 (EDT) 

> >..
> >[deleted]
> >...
> >> BUT, TAR+gzip or TAR+Compress does NOT work.
> >> 
...
[deleted]
...
> 
> Here is ftpconversions:
> :.Z: : :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
> : : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
> :.gz: : :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
> : : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
> : : :.tar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
> : : :.tar.Z:/bin/tar -c -Z -f -
%s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
> : : :.tar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
> 

when you invoke tar(GNU tar) with the options -z or -Z
it will execpl() the gzip(for -z) or compress(for -Z)
and the paths are the ones it found at compile time
maybe something like "/usr/local/gnu/bin/gzip"

you should have something like :
: : :.tar.Z:/bin/tar -c --use-compress-program=/bin/compress -f -
%s:T_REG|TDIR:O_COMPRESS|O_TAR:TAR+COMPRESS
: : :.tar.gz:/bin/tar -c --use-compress-program=/bin/gzip -f -
%s:T_REG|T_DI:O_COMPRESS|O_TAR:TAR+GZIP

the --use-compress-program will indicate the right paths

Warning: Of course these only will work for anonymous ftp
because of the chroot i.e. tar will be able to find a /bin/gzip

But for real users WITHOUT the chroot("/home/ftp"), ...
I doubt you have under /bin (realpath) Gnu Tar and gzip.

If you want to make work for real and anonymous

1-
Take a look at Koos's wu-ftpd FAQ, he explains how to set up a pipe
to alleviate this problems and use plain tar.

2-
recreate the hierachie under /home/ftp
i.e
/home/ftp/usr/local/gnu/bin/{gzip,tar}
with the necessary libs if no statically link

3-
do nothing ;-)
one type, real or anonymous depending on ftpconversions, will not be able to
do

get dir.tar.gz

bye

--
alain

Alain Magloire ([email-masked])
___________________________________________________

It's my ftpconversions file:

 :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
 : : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
 :.gz: :  :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
 : : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
 : : :.tar:/bin/tar -cf - %s:T_REG|T_DIR:O_TAR:TAR
 : : :.tar.Z:/bin/tar -c --use-compress-program=/bin/compress -f -
%s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
 : : :.tar.gz:/bin/tar -c --use-compress-program=/bin/gzip -f -
%s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 7 Oct 1998 08:49:09 -0400 (EDT)

On Wed, 7 Oct 1998 [email-masked] wrote:

> About new problems. I'm sorry I can't understand what I should do to
> upload files with on the fly decompression? Next one, when I got files
> with on the fly compression by gzip and run: gunzip -v test.tar.gz, I
> see: "decompression OK. trail garbage ignored".

ftpconversions only applies to download.  on-the-fly compression during
upload is a client-side problem.  The ftp daemon cannot help with it.

-- 

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195