Subject: Directory listing problems with ws-ftpd le

From: [email-masked]
Date: Tue, 15 Apr 1997 20:13:53 +0100

I'm having trouble getting directory listing's to work when connecting
to wu-ftpd-24.-beta13 running on Solaris 2.5.1 when connecting
with WS-FTPD LE from windows 95.

On the Sun box I get the error in /var/adm/messages:-

Apr 15 11:38:47 sun5 ftpd[29020]: refused PORT 0,1076 from
netfm.demon.co.uk

In the WS-FTPD LE 95 client program I see the error:-

PORT 181,100,100,98,4,52
500 Illegal PORT Command
DoDirList returned 0

This problem occurs for all ftp accounts on the machine, with or without

making them secure with "guessgroup all ftpgroup" in ftpaccess. It
even occurs if I turn off the ftpaccess file by using the -A option.

 If you connect directly using DOS ftp, both the dir and ls commands
work fine. How does ws-ftpd do a directory listing ? Can I get the
WU-FTPD to log these methods to try and debug this.

Thanks in advance,

rgds dave.

---

From: [email-masked]
Date: Tue, 15 Apr 1997 23:41:18 +0100

> In the WS-FTPD LE 95 client program I see the error:-

I've since discovered that putting the WS-FTP LE 95 into PASV mode
solves the problem. Also noted that a "dir" command or an "ls" command
issued directly from a DOS ftp session failed first time, then succeeds
on
all subsequent attempts.

There is definitely sometime wrong here, as a standard Solaris FTPD
does not required the client software to use PASV mode. TCP_WRAPPERS
are being used, but when disabled (removed from /etc/inetd.conf) the
problems remain the same.

Any ideas on why PASV mode succeeds  ? Is it better for clients to use
this
client initiation mode - more secure ?

rgds dave

---

From: Alain Magloire <[email-masked]>
Date: Wed, 16 Apr 1997 12:22:45 -0400 (EDT)

hello
> does not required the client software to use PASV mode.

Ftpd servers, solaris nor wu-ftpd, force clients to
use one or the other(POR|PASV).

To download files you can do it via PORT or PASV
some 'OS' i.e DOS, Windows, etc 
don't handle the PORT directive very well, then it's
up to you to specify which one you prefer.

Most ftp client on Unix will use by default PORT
Most web clients will use by default PASV.

> 
> Any ideas on why PASV mode succeeds  ?

if you try with other ftp clients (ncftp, ftp , netscape, ee, etc ..)
and it works than this client or the tcp/ip stack is broken

If not then your setup is wrong
check the faq or the man pages to see what
you must have in

lib/*
dev/*
etc/*

Solaris needs a handfull of libraries and missing one
can cause havoc or ftpd to behave strangely
  - ls -l will show nothing
  - or the wonderfull
    "cannot create data socket (0.0.0.0)"

> Is it better for clients to use this
> client initiation mode 

the server doesn't really care.
If you're behind a firewall, it may be a problem.
You'll have to open the ports somehow I suppose.
There is a patch from Pedro (?)  in the archives to limit
the range of ports.

> - more secure ?

?

PASV and PORT are eqivalent in term of 'security'
Which really doesn't do much

The beta-xx doesn't accept on PORT, ports lower then 1024
and it must be the same IP

-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

---

From: [email-masked]
Date: Wed, 16 Apr 1997 19:57:29 +0100

> and it must be the same IP

How do I change the limit on ports <1024, and do I really want to
to do this. I.E why is the beta-xx set like this ?

I'm using FTP 2.4.2 beta-13, is this the latest ? e.g:-

220 sun5 FTP server (Version wu-2.4.2-academ[BETA-13](1) Fri Apr 11
09:52:06 BST 1997) ready.

Thanks for the excellent responce,

rgds dave

---

From: Alain Magloire <[email-masked]>
Date: Wed, 16 Apr 1997 16:08:20 -0400 (EDT)

Hello 

> I'm using FTP 2.4.2 beta-13, is this the latest ? e.g:-

This is something I don't agree with because
it is in clear violation of the Protocol as define by
the RFC. But I can understand the reasons.

Also if you're patient there was a long thread on this a year
ago, so it's in the archive.

Let me resume the thread for you with some examples
of the danger of having ports < 1024.

 DATA PORT (PORT)

  The argument is a HOST-PORT specification for the data port
  to be used in data connection.  There are defaults for both
  the user and server data ports, and under normal
  circumstances this command and its reply are not needed.  If
  this command is used, the argument is the concatenation of a
  32-bit internet host address and a 16-bit TCP port address.
  This address information is broken into 8-bit fields and the
  value of each field is transmitted as a decimal number (in
  character string representation).  The fields are separated
  by commas.  A port command would be:

     PORT h1,h2,h3,h4,p1,p2

  where h1 is the high order 8 bits of the internet host
  address.

When data is to be transfer between a client and a server. The client
can specify to which port it wants the data to arrive. The client then
listen to the port number specify in the PORT command. The server makes an
active open to that port and sends the data.

Like we discuss before the host specify in the argument portion of the PORT
doesn't have to be the same IP as the client, hence open the door to
all sort of abuse. The easiest example that comes to mind is fake email.

  .....
 STOR smtp_file
 PORT a,b,c,d,0,25  # a,b,c,d --> a.b.c.d --> victim_ip
 RETR smtp_file

This sends an untracable mail to victim_ip. The logs on victim_ip will
always show that the connection was made by the FTP server. It's a good
way to pass thru firewalls.

---

From: Francis Nguyen <[email-masked]>
Date: Wed, 16 Apr 1997 16:24:37 -0500

Could someone please tell me how I can set up the message/banner files
when login and out of WU-FTPD 2.4. I'm currently setting up WU-FTPD 2.4
on Solaris 2.5.1.

Are "message" and "banner" commands?

Thanks very much.

Francis <[email-masked]>