FTP 125 Data Connection Open vs 331 Username OK, Need Password
FTP 125 (Data Connection Open) is a 1xx Positive Preliminary response, while 331 (Username OK, Need Password) is a 3xx Positive Intermediate response. 125 indicates that the data connection is already open and the transfer is beginning. No need to open a new data connection. In contrast, 331 means that user name okay, need password. The server recognized the username and is waiting for the corresponding password to complete authentication.
Описание
The data connection is already open and the transfer is beginning. No need to open a new data connection.
Когда вы это видите
When the server reuses an existing data connection for a file transfer instead of opening a new one.
Как исправить
No fix needed — the transfer is starting immediately. Your client should begin reading or writing data on the existing connection.
Описание
User name okay, need password. The server recognized the username and is waiting for the corresponding password to complete authentication.
Когда вы это видите
After sending the USER command with a valid username. The server is prompting for the PASS command.
Как исправить
Send the PASS command with the correct password. If you get 530 after PASS, the password is wrong — verify your credentials.
Ключевые различия
125 is a 1xx Positive Preliminary response, while 331 is a 3xx Positive Intermediate response.
FTP 125: The data connection is already open and the transfer is beginning. No need to open a new data connection.
FTP 331: User name okay, need password. The server recognized the username and is waiting for the corresponding password to complete authentication.
You encounter 125 when when the server reuses an existing data connection for a file transfer instead of opening a new one.
You encounter 331 when after sending the USER command with a valid username. The server is prompting for the PASS command.
Когда что использовать
For 125 (Data Connection Open): No fix needed — the transfer is starting immediately. Your client should begin reading or writing data on the existing connection. For 331 (Username OK, Need Password): Send the PASS command with the correct password. If you get 530 after PASS, the password is wrong — verify your credentials.