Why is Cygwin ftp hanging on connect


I'm trying to use the Cygwin ftp client in Windows 7 but it just hangs on connect:

$ ftp -d ftp.redhat.com
User (ftp.redhat.com:(none)): anonymous
---> USER anonymous


Windows ftp from a command prompt connects without any issue:

C:\> ftp ftp.redhat.com
Connected to ftp.redhat.com.
220 Red Hat FTP server ready. All transfers are logged. <FTP> [no EPSV]
User (ftp.redhat.com:(none)): anonymous
331 Please specify the password.
230 Login successful.

Best Answer

I think that the appearance is misleading. Could it be that there is no default FTP support in Cygwin ?

$ which ftp

whereas the usual directory for Cygwin executables has no such file:

$ ls /usr/bin/ftp*
ls: cannot access /usr/bin/ftp*: No such file or directory

That means that it's actually the Windows7 FTP client that is being launched from the Cygwin prompt, which is currently not supported. In the link provided by Tim Supinie, compatibility problems are mentioned for the blanking that needs to happen when the user enters his password.

My solution has been to look for a Cygwin variant of FTP, but Cygwin's setup.exe is remarkably clumsy at this point. I was only being offered some fancier FTP clients. The solution was also provided in that link. Kevin Panko, it literally instructs to download the inetutils package in Cygwin, which contains popular networking clients. By entering that word in Cygwin's setup.exe, I ended up with the true native FTP client under Cygwin, as proven by:

$ which ftp