Subject: How to make wu-ftpd and AIX compress work together.

From: "Michael A. McCollum" <[email-masked]>
Date: Thu, 09 Feb 1995 08:42:50 -0500 (EST)

I am currently running the wu-ftpd daemon under AIX 3.2.5.  I am very 
happy with the product and have found almost everything easy to compile, 
configure, operate,etc.  I do, however, have a problem getting the 
automatic conversion of files to unix compress format to operate.  

I have my ftpconversions file set up to allow people to request files in 
tar, gzip, zip and compress formats.  Everything works fine for a "real" 
user, even compress.  For an anonymous user, however, only tar, gzip and 
zip file conversion work correctly.  When an anonymous user requests a 
file blah as blah.Z the following is displayed on the screen:

ftp> get blah.Z
200 PORT command successful.
150 Opening BINARY mode data connection for /bin/compress.
226 Transfer complete.
ftp>

The result is a 0 byte file transferred to the anonymous user.  However, 
the conversion to gzip works fine:

ftp> get blah.gz
200 PORT command successful.
150 Opening BINARY mode data connection for /bin/gzip.
226 Transfer complete.
2315 bytes received in 0.2673 seconds (8.458 Kbytes/s)
ftp> 

Both of these operations work successfully for a "real" user (no 0 byte 
files are xfered).

I am aware of the shared library problem that exists on some systems.  
So, to try and T/S this problem, I copied every lib I could find into 
/u/ftp/lib & /u/ftp/usr/lib just to see what would happen.  No change.

The applicable lines in my ftpconversions file are:

 :.Z: : :/bin/uncompress -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
 : : :.Z:/bin/compress -c %s:T_REG|T_ASCII:O_COMPRESS:COMPRESS

and the perms to /u/ftp/bin/compress are set to 111.  My ftp access file 
has the following lines to allow compression/decompression:

compress        yes             all
uncompress      yes             all

Have I overlooked something obvious?  Any help would be much appreciated.

   +-------------------------------------------+
   |  Michael McCollum                         |
   |  National Cancer Institute		       |
   |  National Institutes of Health            |
   |  Building 82, Room: B07   +--------------------------------------+
   |  9030 Old Georgetown Road | Internet: [email-masked] | 
   |  Bethesda, Maryland 20892 | Phone: (301) 402-0727                |
   +---------------------------| Fax:   (301) 480-8105                |
                               +--------------------------------------+

Be wary of strong drink.  It can make you shoot at tax collectors and
miss.
                -- Lazarus Long, "Time Enough for Love"

=======================================================================
=                ALL THE USUAL DISCLAIMERS APPLY                      =
=======================================================================

---

From: Randy Medd <[email-masked]>
Date: Thu, 09 Feb 1995 09:13:24 -0800

I'd like to add my experience to the mix.  I'm trying for the
same capability under HP-UX and have had the same results.

On the assumption that there was a problem with my directory
structure, I tried an experiment.  I replaced my ~ftp/bin/compress
with a copy of ~ftp/bin/ls.  With this setup, when I try to retrieve
foo (from foo.Z), ftpd will fire up a copy of ls instead of compress.
Surprise, surprise, it works - what I get is a short 'dir' listing in
foo on the client machine. e.g.

ftp> _dir_
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 18
drwxr-xr-x  10 root     sys         1024 Feb  9 09:08 .
drwxr-xr-x  10 root     sys         1024 Feb  9 09:08 ..
d--x--x--x   2 root     sys         1024 Feb  9 09:06 bin
drwxr-xr-x   2 root     sys         1024 Feb  3 17:09 etc
-rw-rw-r--   1 root     sys          654 Feb  9 09:08 foo.Z
drwxrwxrwx   2 root     sys         1024 Feb  3 16:37 pub
226 Transfer complete.
ftp> _get foo_
200 PORT command successful.
150 Opening BINARY mode data connection for /bin/compress.
226 Transfer complete.
6 bytes received in 0.03 seconds (0.21 Kbytes/s)
ftp> _!_
$ _cat foo_
foo.Z
$

This happened because ftpd exec'd /bin/compress -c -d foo.Z, which
turned into /bin/ls -c -d foo.Z.

If there is no ~ftp/bin/compress at all, I get:

ftp> _get foo_
200 PORT command successful.
550 Local error: conversion program not found. Cannot UNCOMPRESS file.
ftp>

while when there is a valid compress, I get (like Michael McCollum did):

ftp> _get foo_

This evidently has nothing to do with AIX/HP-UX, at least as far as I
can tell.

-- 
-------------------------------------------------------------
Randy Medd                           email: [email-masked]
Telamon, Inc.
492 Ninth Street, Suite 310          voice: 510-987-7700
Oakland, CA 94607                      fax: 510-987-7009
-------------------------------------------------------------