Knowledge Base

Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).


I can connect to an FTP site but I can't list or transfer files.

FTP sessions use two network connections:

  1. The control channel is for user authentication and sending commands and ...

  2. The data channel is for transferring files and directory listings.

If you can connect to an FTP server but not transfer files or directory listings, the most likely cause is a blocked data channel.

More About FTP Control Channels

FTP sessions are established on the FTP control channel. If you are able to connect and authenticate then your control channel is probably fine. The default port is 21 for most control channels except for FTPS Implicit connections for which 990 is the default. Use the /port=x option of the FTPLOGON command to make Robo-FTP attempt a control channel connection on a specific port.

More About FTP Data Channels

FTP data channels are opened and closed as needed during an FTP session. There are two methods or opening a data channel:

  1. Passive Mode is the preferred data channel method for modern FTP clients because, in this mode, the client opens an outbound connection to a port specified by the server. A client sends the PASV command to request that a server allow an inbound data channel connection. The server responds with an IP address and port number on which it will be waiting for the client to open a connection.

  2. Active Mode is falling out of favor because it requires that the server make an inbound connection to the client computer. When a client requests an active mode connection, it sends the PORT command along with its IP address and the port where it will be waiting for the server to open a connection.

Beginning with version 3.7 Robo-FTP defaults to passive mode because, in our experience, the chances of making a successful outbound connection are higher than those of accepting a successful inbound connection.

Troubleshooting

When you can connect but not list or transfer files, the first troubleshooting step should be to try the opposite data channel mode. In Robo-FTP, add the /pasv=false option to the FTPLOGON command line to use active mode or remove it to revert to the default passive mode.

If you are using passive mode data connections:

  1. Contact the owner of the FTP server and ask "What is your passive port range?" then ask your network administrator to allow outbound connections to the FTP server on that port range.
  2. If connecting over FTPS you can try using the FTPSCCC server type (FTPS Data Only) to allow the firewalls on either end to dynamically figure out which ports to open when.
  3. If you are using version 3.7 or older you can try adding /restrictipaddr to your FTPLOGON command line in case the IP address returned in the PASV response is incorrect.

If you are using active mode data connections:

  1. If connecting over FTPS you can try using the FTPSCCC server type (FTPS Data Only) to allow the firewalls on either end to dynamically figure out which ports to open when.
  2. Ask your network administrator to allow inbound connections to your computer and then use the /minport, /maxport and /myipaddr options of the FTPLOGON command to force Robo-FTP to send a public IP address in an allowed port range.

Decoding port numbers

Examine the Trace Log and find the PORT or PASV command. There should be six digits separated by commas. To decode the port number, take the 5th number and multiple by 256 then add the 6th number. For example, if your Trace Log contains this:

->- PASV
-<- 227 Entering Passive Mode (209,198,133,148,170,225)

This means that the server is waiting for an incoming passive mode data channel connection on port 43745

43745 = (170 * 256) + 225

See also:

Using Robo-FTP behind a NAT router firewall

Robo-FTP returns: *Connection to FTP site failed. [1152] but Windows command line FTP client connects fine. Why?

Problem downloading files from GXS ecXpress FTP server

Article last updated: 2022-01-11

Tags: FTP, active mode, passive mode