Unable to use Mac OS X FTP

Unable to use the Mac OS X command line ftp client because of Illegal EPRT command.

ProblemWhen trying to use the Mac OS X ftp client the following error occues when trying to list the files on the ftp server. ftp> ls 229 Entering Extended Passive Mode (|||37628|) 502 Illegal EPRT Command 200 PORT command successful.

421 Service not available, remote server timed out. Connection closed
ftp>

SolutionIssue a epsv4 command to turn EXPV/EPRT on IPv4 off.

ftp> epsv4
EPSV/EPRT on IPv4 off.
ftp> ls
227 Entering Passive Mode (64,40,110,153,254,46)
150 Opening ASCII mode data connection for /bin/ls.
total 64
srwxrwxrwx   1 mysql    other          0 Jun 23 12:27 mysql.sock
-rw-rw----   1 mysql    other        849 Jun 23 12:27 sh2600
-rw-r--r--   1 root     other         10 Jul 14 11:29 time
drwxrwxr-x   2 root     root         176 Jun 23 12:27 .X11-pipe
drwxrwxr-x   2 root     root         176 Jun 23 12:27 .X11-unix
226 Transfer complete.
ftp>