ftp/fetch "command not understood" on stable and current

Brandon Fosdick brandon.h.fosdick at lmco.com
Fri Oct 17 09:58:31 PDT 2003


Scot W. Hetzel wrote:
> Your ftp client went into passive mode.  The reason it went to passive mode
> is because the /etc/login.conf file is setting an environment variable
> ((FTP_PASSIVE_MODE=YES) to turn on passive mode.  To disable it, run ftp or
> fetch under sh as follows:
> 
> FTP_PASSIVE_MODE=NO ftp ...
> FTP_PASSIVE_MODE=NO fetch ...
> 
> or change FTP_PASSIVE_MODE  to NO in the "default" section of
> /etc/login.conf, and then use cap_mkdb /etc/login.conf to rebuild the
> login.conf.db.

I changed login.conf and ran cap_mkdb, but ftp still doesn't work quite 
right. Forunately fetch works now, but its a bit slow to connect. Almost 
like its having the same problem as ftp.

---
9:35 bfoz at svlw3380c0m~>echo $FTP_PASSIVE_MODE
NO
9:36 bfoz at svlw3380c0m~>ftp ftp.freebsd.org
Trying 2001:4f8:0:2::e...
Trying 204.152.184.73...
Connected to ftp.freebsd.org.
220 freebsd.isc.org FTP server ready.
Name (ftp.freebsd.org:bfoz): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
<snip>
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
500 command not understood
227 Entering Passive Mode (204,152,184,73,229,15)
---
More waiting...and then the listing.

Why does it say "command not understood"?

ftp works a little better if I use the passive command before connecting:

---9:40 bfoz at svlw3380c0m~>echo $FTP_PASSIVE_MODE
NO
9:40 bfoz at svlw3380c0m~>ftp
ftp> passive
Passive mode: off; fallback to active mode: off.
ftp> o ftp.freebsd.org
Trying 2001:4f8:0:2::e...
Trying 204.152.184.73...
Connected to ftp.freebsd.org.
220 freebsd.isc.org FTP server ready.
Name (ftp.freebsd.org:bfoz): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230-
230-You have reached freebsd.isc.org/ftp.freebsd.org.
230-
230-<insert some funky ASCII art here>
230-
230-This server is operated by Internet Software Consortium (ISC),
230-on behalf of the FreeBSD Project, and is serving the full
230-FreeBSD FTP archive via IPv4 and IPv6.
230-
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
500 command not understood
200 PORT command successful.
150 Opening ASCII mode data connection for directory listing.
total 8
drwxrwxr-x   3 root     root          512 Apr 17  2003 pub
226 Transfer complete.
ftp>
---

although it still says command not understood. What does that mean?



More information about the freebsd-stable mailing list