Can't ls with ftp.apple.asimov.net

11 posts / 0 new
Last post
Offline
Last seen: 1 year 2 months ago
Joined: Jul 15 2014 - 10:52
Posts: 43
Can't ls with ftp.apple.asimov.net

When using the command-line 'ftp' program and logging into Asimov as anonymous, I cannot list any directories. However, web browsers and Filezilla work fine. Why?

Offline
Last seen: 4 weeks 1 day ago
Joined: May 27 2013 - 13:01
Posts: 812
Re: Can't ls with ftp.apple.asimov.net

I do not recall ever having used the ftp client program from the windows command window, but I was able to get a listing.

Here is the log file:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\insanitor>ftp
ftp> ftp.apple.asimov.net
Invalid command.
ftp> ?
Commands may be abbreviated. Commands are:

! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdir
ftp> open
To ftp.apple.asimov.net
Connected to public.asimov.net.
220 ProFTPD 1.3.4a Server (Asimov Apple ][ Archive) [208.185.231.250]
User (public.asimov.net:(none)): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230-
** MIRRORS WANTED -- EMAIL if you can help! **

Need more speed? try a mirror closer to you!
Check MIRROR.LIST for a current list.

230 Anonymous access granted, restrictions apply
ftp> list
Invalid command.
ftp> port
Invalid command.
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
pub
welcome.msg
MIRROR.LIST
226 Transfer complete
ftp: 31 bytes received in 0.00Seconds 31000.00Kbytes/sec.
ftp> list
Invalid command.
ftp>

Offline
Last seen: 1 year 2 months ago
Joined: Jul 15 2014 - 10:52
Posts: 43
Re: Can't ls with ftp.apple.asimov.net

I guess I should have clarified that I am using Linux (Debian 7.8, to be exact). Beee Anyway, I'll try it with Windows' ftp.

EDIT: Tried it, and it failed. `ls' still returns "Illegal PORT command".

Offline
Last seen: 4 weeks 1 day ago
Joined: May 27 2013 - 13:01
Posts: 812
Re: Can't ls with ftp.apple.asimov.net

In some cases, the router you're using might be incompatible with the ftp client program that you are using.

The reason is: the FTP client program thinks it is connecting to an FTP server within the same network that your computer is connected to.

If you are behind a router, the PORT command will specify an internal IP address which is specific to your network.

If the internal IP address of the server does not match that IP, you will get a 500 illegal port command error.

There are two ways to solve this:

1). simply connect to the internet without a router.

2). use PASV mode.

If you could post a log file, maybe I can pinpoint the problem.

Offline
Last seen: 3 years 5 months ago
Joined: Apr 10 2006 - 20:01
Posts: 1013
Re: Can't ls with ftp.apple.asimov.net

Ah, kids these days.

Try 'dir' instead of 'ls'.

Quote:
C:\>ftp ftp.apple.asimov.net
Connected to public.asimov.net.
220 ProFTPD 1.3.4a Server (Asimov Apple ][ Archive) [208.185.231.250]
User (public.asimov.net:(none)): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230-
** MIRRORS WANTED -- EMAIL modus-apple2 if you can help! **

Need more speed? try a mirror closer to you!
Check MIRROR.LIST for a current list.

230 Anonymous access granted, restrictions apply
ftp> dir
200 PORT command successful
150 Opening ASCII mode data connection for file list
-rw-rw-r-- 1 apple2 apple2 73 Nov 26 2009 MIRROR.LIST
drwxrwxr-x 3 apple2 apple2 4096 Feb 16 2010 pub
-rw-rw-r-- 1 apple2 apple2 198 Jun 21 2001 welcome.msg
226 Transfer complete
ftp: 196 bytes received in 0.00Seconds 196000.00Kbytes/sec.
ftp>

Offline
Last seen: 3 years 3 months ago
Joined: Jun 15 2014 - 12:48
Posts: 305
Re: Can't ls with ftp.apple.asimov.net

I was just about to give the same advice. dir works.

Offline
Last seen: 1 year 2 months ago
Joined: Jul 15 2014 - 10:52
Posts: 43
Re: Can't ls with ftp.apple.asimov.net

insanitor wrote:
In some cases, the router you're using might be incompatible with the ftp client program that you are using.

The reason is: the FTP client program thinks it is connecting to an FTP server within the same network that your computer is connected to.

If you are behind a router, the PORT command will specify an internal IP address which is specific to your network.

If the internal IP address of the server does not match that IP, you will get a 500 illegal port command error.

There are two ways to solve this:

1). simply connect to the internet without a router.

2). use PASV mode.

If you could post a log file, maybe I can pinpoint the problem.

I just tried `ls' and `dir' while connected to another network, and both work fine, so I think it might indeed be my router, or something like that.

Also, I would like everyone to remember that I am using the Linux ftp program (I abhor Windows, and Mac is too expensive), but it doesn't seem to matter to the problem. It looks like it's the same FTP program on both Windows and Linux.

Offline
Last seen: 3 years 5 months ago
Joined: Apr 10 2006 - 20:01
Posts: 1013
Re: Can't ls with ftp.apple.asimov.net

KF5SDR wrote:
Also, I would like everyone to remember that I am using the Linux ftp program

FTP is FTP is FTP. Doesn't matter the platform. It's a protocol that your client is fulfilling.

Offline
Last seen: 4 weeks 1 day ago
Joined: May 27 2013 - 13:01
Posts: 812
Re: Can't ls with ftp.apple.asimov.net

david__schmidt wrote:
KF5SDR wrote:
Also, I would like everyone to remember that I am using the Linux ftp program

FTP is FTP is FTP. Doesn't matter the platform. It's a protocol that your client is fulfilling.

Not always. Depending on the client, the sequence of commands sent to the server might be different.

Some ftp client programs will do PASV mode as default in order to prevent this problem.

Others, upon connection will immediately send a series of commands to determine what commands are supported.

Those commands have a slight possibility of crashing the server.

And that windows CMD client. It does not even send a PORT or PASV mode command upon connection to get a file listing.

Offline
Last seen: 1 year 2 months ago
Joined: Jul 15 2014 - 10:52
Posts: 43
Re: Can't ls with ftp.apple.asimov.net

I tried logging in to Asimov using passive (PASV) mode, and listing directories works fine! Thanks, everyone, for your help!

Offline
Last seen: 4 weeks 1 day ago
Joined: May 27 2013 - 13:01
Posts: 812
Re: Can't ls with ftp.apple.asimov.net

Just remember, PASV mode will not work if the server is not configured correctly.

Some examples of this can be found on my website:

http://www.insanecrazy.com/mistakes.html

Log in or register to post comments