FTP Connection Control Command Format

Source: Internet
Author: User
Tags ftp connection

From: http://club.topsage.com/thread-166971-1-1.html

The command is transmitted as an nvt ASCII string. Each command starts with three or four uppercase nvt ASCII characters, followed by an option parameter and a Cr/LF pair to identify the end of the command

A response consists of three nvt ASCII numbers and one option message.

A long response may contain multiple messages. The three digits of the first message are followed by a break number, and the last message is not. There is no need to carry three numbers in the middle of the message, but if there are three numbers, a break is required.

The following is a list of all commands. Commands with asterisks are rarely used, so they are often not supported in specific implementations.

String meaning

Abor discard Transfer

* Some Acct systems associate accounts and users with file systems

* Allo allocates space for the files to be transferred. The following parameters are used to determine the number of bytes.

* Append an existing file to appe.

Cdup switches the current directory to the parent directory in a remote system.

CWD changes the working directory of the remote system

Dele deletes files from a remote system.

Help reads help information from the server, such as the list of supported commands.

List send the file name list in the current working directory on a newly established data connection

Create a directory for MKD

Mode specifies the transmission mode. Portable parameters include S, B, and C.

NLST sends a "full" directory list under the current directory on a newly established data connection.

Noop is null to prevent connection disconnection

PASS provides a user logon password, which must be followed immediately after the USER command

* PASV specifies that the server's data transmission process listener waits for the client's data connection to establish a request

Port specifies the port number of the client listening waiting for the connection established by the server.

PWD displays the current working directory name on the server.

Quit log out and terminate the connection

* Rein reinitialization. log out but the connection is not closed. A new USER command must be issued later.

* Rest transmission starts again from a server ID.

RETR retrieves a file from the remote system

RMD deletes a directory

* RNFR specifies the old path name of the file to be named, followed by an RNTO command

* RNTO specifies the new path name of the file to be named

* Services provided by site-specific servers

* SMNT structure loading: Provides the remote system path name of a file system structure

* Stat status information

Stor uploads a file to the server. If the file already exists, it overwrites

* STOU uploads a file to the server and does not overwrite the existing file

Stru specifies the file structure. The parameter can be F, R, or P.

* Syst reports the operating system type of the remote system

Type specifies the file type. The parameters can be A, E, I, and L. Only type A and type I are commonly used.

The control connection command responds in the following form:

Type description

1yz initiates a preliminary response and waits for another response before sending another command

2yz takes the initiative to final the response, and the last command is successfully completed

3yz initiates an intermediate response and must send another command

4yz temporarily responds passively. The requested action cannot be completed at the time, but you can try again.

5yz responds passively permanently, and the requested action cannot be completed. Retry is not recommended.

"Y" numeric encoding further information:

Digit meaning

0 syntax errors

1. Information

2 connection status

3 certification and Accounting

4 Reserved

5 File S file system status

Below are some typical messages:

Number meaning

125 data connection is enabled and transmission starts

200 command OK

331 enter the password when the user name is OK

425 data connection cannot be enabled

452 file writing error

500 syntax error-unrecognized life

For more information, see RFC.

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.