FTP reply code 150 is the most common preliminary reply you will see during file transfers. It indicates that the server has verified the file exists (for downloads) or the path is writable (for uploads), and is now opening the data connection to begin the transfer. The server typically includes the file size and transfer mode in the response text. After 150, the data flows over the separate data connection (port 20 in active mode or a negotiated port in passive mode). The transfer completes with a 226 response. If you see 150 but the transfer never completes, the data connection is blocked — usually by a firewall.
The client sent RETR (download), STOR (upload), APPE (append), or LIST (directory listing) and the server confirmed the request is valid. The data connection is being opened and the transfer will begin.
The client sent LIST or NLST to retrieve a directory listing. The server sends 150 before streaming the listing data over the data connection, followed by 226 when complete.
The response text for 150 often includes the transfer mode (ASCII or Binary/Image) and the file size. This helps the client set up progress tracking. The mode is set by the TYPE command (TYPE A for ASCII, TYPE I for binary).
After 150, the transfer should proceed and end with 226 (Closing data connection, transfer complete). If you see 150 but no data arrives and no 226 follows, the data connection is being blocked.
If you see 150 but the transfer hangs, your firewall is likely blocking the data connection. Switch from active mode (PORT) to passive mode (PASV) so the client initiates the data connection outbound.
curl --ftp-pasv -O ftp://ftp.example.com/file.txt
In active mode, the server connects back to the client on a random high port. In passive mode, the client connects to the server on a random high port. Ensure your firewall allows these connections.
Scan PortsIf the transfer completes but the file is corrupted, you may be using ASCII mode for a binary file. Ensure TYPE I (binary) is set before transferring non-text files.
curl -v ftp://ftp.example.com/file.zip --use-ascii
The data connection is already established and the file transfer is beginning immediately.
The file transfer completed successfully and the data connection is being closed.
The server could not establish the data connection needed for the file transfer.
The data connection was closed unexpectedly and the file transfer was aborted.
The file operation was not completed because the file is temporarily unavailable.