FTP

FTP 213 File Status vs 221 Closing Control Connection

Both FTP 213 (File Status) and 221 (Closing Control Connection) belong to the 2xx Positive Completion category. 213 indicates that file status reply. The server provides information about a specific file, typically its size or modification time. Meanwhile, 221 means that service closing control connection. The server is logging out and closing the session in response to a QUIT command.

Description

File status reply. The server provides information about a specific file, typically its size or modification time.

When You See It

After issuing the SIZE or MDTM command, the server returns the file size in bytes or the last modification timestamp.

How to Fix

No fix needed — this is an informational response. Use the returned data to determine file size before download or to check timestamps for synchronization.

Description

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

When You See It

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

How to Fix

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

Key Differences

1.

FTP 213: File status reply. The server provides information about a specific file, typically its size or modification time.

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 213 when after issuing the SIZE or MDTM command, the server returns the file size in bytes or the last modification timestamp.

4.

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

When to Use Which

For 213 (File Status): No fix needed — this is an informational response. Use the returned data to determine file size before download or to check timestamps for synchronization. For 221 (Closing Control Connection): No fix needed — the session has ended normally. Reconnect with a new session if needed.

Learn More