FTP

FTP 212 Directory Status vs 331 Username OK, Need Password

FTP 212 (Directory Status) is a 2xx Positive Completion response, while 331 (Username OK, Need Password) is a 3xx Positive Intermediate response. 212 indicates that directory status reply. The server provides information about the current directory or a specified directory. 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.

คำอธิบาย

Directory status reply. The server provides information about the current directory or a specified directory.

เมื่อคุณพบเห็น

After issuing the STAT command on a directory, the server returns the directory listing or status information.

วิธีแก้ไข

No fix needed — this is an informational response showing directory contents or status.

คำอธิบาย

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.

ความแตกต่างหลัก

1.

212 is a 2xx Positive Completion response, while 331 is a 3xx Positive Intermediate response.

2.

FTP 212: Directory status reply. The server provides information about the current directory or a specified directory.

3.

FTP 331: User name okay, need password. The server recognized the username and is waiting for the corresponding password to complete authentication.

4.

You encounter 212 when after issuing the STAT command on a directory, the server returns the directory listing or status information.

5.

You encounter 331 when after sending the USER command with a valid username. The server is prompting for the PASS command.

ควรใช้อันไหนเมื่อไร

For 212 (Directory Status): No fix needed — this is an informational response showing directory contents or status. 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.

เรียนรู้เพิ่มเติม