File Transfer Protocol (Chinese version) (iii)

Source: Internet
Author: User
Tags file transfer protocol

5.4. Command and response sequence

Communication between the server and the user is a dialogue process. The user sends an FTP command, waits for one or more responses from the server, and then sends a new command based on the response.

Connection
The response contains a lot of information. Normally, the server returns a 220 response and waits for the input. After receiving the response, the user sends a new command. If the server cannot receive the input immediately, after 220
Returns the value 120. For example, if the server stops working after 15 minutes, the server sends messages to the user, but the server cannot send messages directly to the user. The message is buffered and returned in the next response.
Return to the user. The following lists the command responses. The first is the prepared response, the second is the final response, the third is the rejected response, and the third is the intermediate response. These responses form the basis of the status chart, which will be shown in the following section.
Given:

  •  

    • Establish a connection

120

220

220

421

  •  

    • Login

    1. User
    2. 230

      530

      500,501,421

      331,332

    3. Pass
    4. 230

      202

      530

      500,501,503,421

      332

    5. Acct
    6. 230

      202

      530

      500,501,503,421

    7. CWD
    8. 250

      500,501,502,421,530,550

    9. Cdup
    10. 200

      500,501,502,421,530,550

    11. SMNT

202,250

500,501,502,421,530,550

  •  

    • Log out

    1. Rein
    2. 120

      220

      220

      421

      500,502

    3. Quit

221

500

  •  

    • Transmission Parameters

    1. Port
    2. 200

      500,501,421,530

    3. PASV
    4. 227

      500,501,502,421,530

    5. Mode
    6. 200

      500,501,504,421,530

    7. Type
    8. 200

      500,501,504,421,530

    9. Stru

200

500,501,504,421,530

  •  

    • File Operation commands





  • Allo
  • 200

    202

    500,501,504,421,530

  • Rest
  • 500,501,502,421,530

    350

  • Stor
  • 125,150

    (110)

    226,250

    425,426,451,551,552

    532,450,452,553

    500,501,421,530

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.