FTP

FTP 200 Command OK vs 221 Closing Control Connection

Both FTP 200 (Command OK) and 221 (Closing Control Connection) belong to the 2xx Positive Completion category. 200 indicates that the command has been successfully executed. This is a general acknowledgment that the command was understood and carried out. Meanwhile, 221 means that service closing control connection. The server is logging out and closing the session in response to a QUIT command.

Описание

The command has been successfully executed. This is a general acknowledgment that the command was understood and carried out.

Когда вы это видите

After issuing any command that completes successfully, such as TYPE, MODE, or NOOP.

Как исправить

No fix needed — the command succeeded. This is the standard positive response for commands that don't return data.

Описание

Service closing control connection. The server is logging out and closing the session in response to a QUIT command.

Когда вы это видите

After issuing the QUIT command to gracefully disconnect from the FTP server.

Как исправить

No fix needed — the session has ended normally. Reconnect with a new session if needed.

Ключевые различия

1.

FTP 200: The command has been successfully executed. This is a general acknowledgment that the command was understood and carried out.

2.

FTP 221: Service closing control connection. The server is logging out and closing the session in response to a QUIT command.

3.

You encounter 200 when after issuing any command that completes successfully, such as TYPE, MODE, or NOOP.

4.

You encounter 221 when after issuing the QUIT command to gracefully disconnect from the FTP server.

Когда что использовать

For 200 (Command OK): No fix needed — the command succeeded. This is the standard positive response for commands that don't return data. For 221 (Closing Control Connection): No fix needed — the session has ended normally. Reconnect with a new session if needed.

Узнать больше