Subject: Problems with conversions and etc

From: Albert Etienne <[email-masked]>
Date: Mon, 02 Nov 1998 14:10:20 -0600

Hey Guys/Gals,

Haven't  been on the list long, I hope this isn't a repeat problem.  I
have looked over the faqs and such with no luck.
Also when replying to other peoples problems should I reply to the list
as well?  I haven't in the past to decrease traffic.  Please advise.

==>  PROBLEM #1

220 alpha FTP server (Version wu-2.4.2-academ[BETA-18](1) Mon Nov 2
13:36:10 CST 1998) ready.
Name (alpha:etienalb): etienalb
331 Password required for etienalb.
Password:
230 User etienalb logged in.
ftp> pwd
257 "/home/etienalb" is current directory.
ftp> cd ~ftp
250 CWD command successful.
ftp> pwd
257 "/" is current directory.
ftp>

alpha# cat /etc/passwd
-------<CUT>------------
ftp:x:100:100:Anonymous FTP:/usr/local/ftp/./.:/bin/false
etienalb:x:107:14:Albert Etienne:/home/etienalb:/bin/ksh
-------<CUT>--------------

alpha# uname -a
SunOS alpha 5.6 Generic_105181-08 sun4u sparc SUNW,Ultra-5_10

This worked correctly on an earlier version.

===>  Problem #2

The following line in ftpaccess does not work on the latest version but
does work on this version and earlier
class   all     real,guest,anonymous     161.26.*.* 127.0.0.1

alpha# cat /var/adm/messages
-----CUT-------
Nov  2 13:27:12 alpha ftpd[499]: ACCESS DENIED (not in any class) TO
Nov  2 13:27:12 alpha ftpd[499]: FTP LOGIN REFUSED (access denied) FROM
alpha [161.26.28.13], etienalb

alpha# ifconfig -a
lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
        inet 127.0.0.1 netmask ff000000
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 161.26.28.13 netmask ffffff00 broadcast 161.26.28.255
        ether 8:0:20:9f:ad:20

====>   PROBLEM #3

I have never been able to get the automatic conversions for compress,
tar, gzip  etc to work
I do not get errors or anything.  When used through site exec all work
fine.

ftp> ls
---> PORT 161,26,28,13,128,72
200 PORT command successful.
---> NLST
150 Opening ASCII mode data connection for file list.
APAGE
apage-source.tar.gz
acroread_solaris_301.tar.gz
binutils-2.9
binutils-2.9.tar
findutils-4.1.tar.gz
fileutils-3.16
fileutils-3.16.tar
fwtk
CHANGES
CHECKSUMS
DISCLAIMER
LICENSE
README
fwtk-doc-only.tar.Z
fwtk.tar.Z
fwtk2.1.tar.Z
wu-ftpd-2.4.2-beta-18
wu-ftpd-2.4.2-beta-18-vr10.tar
wu-ftpd-2.4.2-beta-18.tar
226 Transfer complete.
332 bytes received in 0.025 seconds (12.82 Kbytes/s)
ftp> get LICENSE.Z
---> PORT 161,26,28,13,128,73
200 PORT command successful.
---> RETR LICENSE.Z
550 LICENSE.Z: No such file or directory.
ftp>

alpha# cat /usr/local/etc/ftpconversions
 :.Z: : :/bin/uncompress -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
 : : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
 :.gz: : :/bin/ftp-exec/gunzip -c %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
 : : :.gz:/bin/ftp-exec/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 --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/ftp-exec/gzip -f -
%s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP

This is the latest ftpconversions file, but I have tried all recommended
permutations.  The above pathnames are correct in the normal and chroot
scenarios.

Please let me know what information would be usefull, as there is alot
that I could include.

Thanks,
Albert Etienne
CNG - New Orleans
(504) 593 - 7103
[email-masked]

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 5 Nov 1998 11:59:28 -0500 (EST)

On Mon, 2 Nov 1998, Albert Etienne wrote:

> Also when replying to other peoples problems should I reply to the
> list as well?  I haven't in the past to decrease traffic.  Please
> advise.

Traffic?

> This worked correctly on an earlier version.

This is a problem in beta-18.  I believe I've fixed it in the VR patches.
Your daemon was probably compiled with ALTERNATE_CD defined, you could try
toggling ALTERNATE_CD in config.h .. this is an educated guess, I
personally have problems with beta-18's handling of '~' and '~<user>'

> The following line in ftpaccess does not work on the latest version
> but does work on this version and earlier

Huh?  I presume you mean it worked on beta-17 and earlier and not with
beta-18

> Nov  2 13:27:12 alpha ftpd[499]: FTP LOGIN REFUSED (access denied) FROM alpha [161.26.28.13], etienalb

It doesn't look to me like your ftpaccess files is being used here.  You
might try making sure the daemon has '-a' on the comand line in
/etc/inetd.conf

> tar, gzip etc to work I do not get errors or anything.  When used
> through site exec all work fine.

> alpha# cat /usr/local/etc/ftpconversions

I presume the daemon was compiled to look for ftpconversions here.  On
most systems, it's in /etc/ftpconversions .. try this:

  cp /usr/local/etc/ftpconversions /etc/ftpconversions

and if that makes it work for real but not anonymous users, then try this:

  cp /etc/ftpconversions ~ftp/etc/ftpconversions

If the daemon was compiled to use /usr/local/etc/ftpconversions you could
try

  cp /usr/local/etc/ftpconversions ~ftp/user/local/etc/ftpconversions

this is why my example site shows ftpconversions copied all over the
place; it didn't seem to work for me until I did that.

-- 

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

---

From: Albert Etienne <[email-masked]>
Date: Thu, 05 Nov 1998 17:50:16 -0600

> > list as well?  I haven't in the past to decrease traffic.  Please

Point taken ;-)

> personally have problems with beta-18's handling of '~' and '~<user>'

220 alpha FTP server (Version wu-2.4.2-academ[BETA-18-VR10](1) Thu Nov 5 11:57:53 CST 1998) ready

It works correctly if I use the following /etc/passwd syntax

    alpha$ grep ftp /etc/passwd
    ftp:x:100:100:Anonymous FTP:/usr/local/ftp:/bin/false

instead of  ftp:x:100:100:Anonymous FTP:/usr/local/ftp/./.:/bin/false
but then with

    anonymous-root  /usr/local/ftp/     all

in the ftpaccess file and

    alpha# grep ftp ~ftp/etc/passwd
    ftp:x:100:100:Anonymous FTP:/usr/local/ftp/pub:/bin/false

the effect should be when logging in as anonymous to chroot to /usr/local/ftp
and cd to pub.  It chroots but does not change to pub.  If I use the /./pub syntax
in the /etc/passwd file for ftp it chroot and cd's to the initial directory indicated,
but fail for future cd ~ftp's.

> might try making sure the daemon has '-a' on the comand line in

alpha$ ps -ef | grep ftp
etienalb 23032   149  0 17:07:01 ?        0:00 in.ftpd -al
etienalb 23031  1377  0 17:07:01 pts/8    0:00 ftp alpha

Yeah, checked that and the problem goes away with this line.
class           all     real,guest,anonymous    *

> place; it didn't seem to work for me until I did that.

I changed it to #define    USE_LOCAL_ETC         in the config.sol file before comp
I have it and all the other files in the following
/etc
/usr/local/etc
~ftp/etc
~ftp/usr/local/etc

Everything seems OK??  This is really driving me nuts because I know its something stupid.

alpha# ./ckconfig
Checking _PATH_FTPUSERS :: /usr/local/etc/ftpusers
ok.

Checking _PATH_FTPACCESS :: /usr/local/etc/ftpaccess
ok.

Checking _PATH_PIDNAMES :: /var/adm/ftp.pids-%s
ok.

Checking _PATH_CVT :: /usr/local/etc/ftpconversions
ok.

Checking _PATH_XFERLOG :: /var/adm/xferlog
ok.

Checking _PATH_PRIVATE :: /usr/local/etc/ftpgroups
ok.

Checking _PATH_FTPHOSTS :: /usr/local/etc/ftphosts
ok.

Where else could I put them?

Thanks for your time and effort.  I really appreciate the help.

cheers,
al

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 5 Nov 1998 20:10:57 -0500 (EST)

> instead of  ftp:x:100:100:Anonymous FTP:/usr/local/ftp/./.:/bin/false

I don't think (but could be wrong, been a while since I looked) the
daemon uses the /./ syntax for the anonymous ftp user.

> but fail for future cd ~ftp's.

With VR10, use the following in ~ftp/etc/passwd:

ftp:*:100:100::/pub:

If you use both anonymous-root and ~ftp/etc/passwd the contents of the
real /etc/passwd entry's home directory for 'ftp' won't matter at all.  
In VR10, if you use these features, all the daemom uses /etc/passwd for
for 'ftp' user (and guests) is the UID/GID and a check on the shell
specification.

> class           all     real,guest,anonymous    *

In VR10, you can use CIDR and netmask format for IP restrictions.  Ie.,

class localusers real,guest,anonymous 10.0.0.0/8 127.0.0.0:255.0.0.0

The stars format (ie. 10.*.*.*) should work but I like CIDR and think
everyone else should too.

> I changed it to #define USE_LOCAL_ETC in the config.sol file before
> comp I have it and all the other files in the following
> /etc
> /usr/local/etc
> ~ftp/etc
> ~ftp/usr/local/etc
> 

Permissions?  Some people try symlinks and that, of course, won't work.

Yeah, I remember when it didn't work for me and I though it was dumb that
I had to copy ftpconversions to ~ftp/etc/ .. onea these days maybe I'll
fix the code.

Patience.  It works, you'll get it.  And, yes, when you get it working
we can all whack our foreheads and say, "Of course!"  Problem with email
support is the loss-y bandwidth (not the mention my geriatric mind ... :)

> alpha# ./ckconfig

ckconfig is old and crufty.  When it's happy things are probably OK, but
no guarentee.  When it complains it can be wrong.  I find eyeballs more
accurate.

> Thanks for your time and effort.  I really appreciate the help.

Might want to look at my example site.
  ftp://ftp.vr.net/pub/wu-ftpd/examples

Also, there's a pre-compiled Solaris 2.6 binary which should work although
it'll want all the files in the normal places (/etc/...).  Maybe there's
some unintended side-effect of changing pathnames.h .. if there is let me
know and I'll try to find it and fix it.  Check the binaries area, there
may also be some pre-compiled support stuff for you (ls, tar, md5sum,
etc).

-- 

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