Showing posts with label FTP Commands. Show all posts
Showing posts with label FTP Commands. Show all posts

List of FTP server return codes

CodeExplanation
100 Series: The requested action is being initiated, expect another reply before proceeding with a new command.
110 Restart marker replay . In this case, the text is exact and not left to the particular implementation; it must read: MARK yyyy = mmmm where yyyy is User-process data stream marker, and mmmm server's equivalent marker (note the spaces between markers and "=").
120 Service ready in nnn minutes.
125 Data connection already open; transfer starting.
150 File status okay; about to open data connection.
200 Command okay.
202 Command not implemented, superfluous at this site.
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.On how to use the server or the meaning of a particular non-standard command. This reply is useful only to the human user.
215 NAME system type. Where NAME is an official system name from the list in the Assigned Numbers document.
220 Service ready for new user.
221 Service closing control connection.
225 Data connection open; no transfer in progress.
226 Closing data connection. Requested file action successful (for example, file transfer or file abort).
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
228 Entering Long Passive Mode (long address, port).
229 Entering Extended Passive Mode (|||port|).
230 User logged in, proceed. Logged out if appropriate.
231 User logged out; service terminated.
232 Logout command noted, will complete when transfer done.
250 Requested file action okay, completed.
257 "PATHNAME" created.
331 User name okay, need password.
332 Need account for login.
350 Requested file action pending further information
421 Service not available, closing control connection. This may be a reply to any command if the service knows it must shut down.
425 Can't open data connection.
426 Connection closed; transfer aborted.
434 Requested host unavailable.
450 Requested file action not taken.
451 Requested action aborted. Local error in processing.
452 Requested action not taken. Insufficient storage space in system.File unavailable (e.g., file busy).
500 Syntax error, command unrecognized. This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken. File unavailable (e.g., file not found, no access).
551 Requested action aborted. Page type unknown.
552 Requested file action aborted. Exceeded storage allocation (for current directory or dataset).
553 Requested action not taken. File name not allowed.

List of FTP commands

Below is a list of FTP commands that may be sent to an FTP host, including all commands that are standardized in RFC 959 by the IETF. All commands below are RFC 959 based unless stated otherwise. These commands differ in use between clients. For example, GET is used instead of RETR, but most clients parse this into the proper command. In this, GET is the user command and RETR is the raw command.

* ABOR - Abort an active file transfer.
* ACCT - Account information.
* ADAT - Authentication/Security Data (RFC 2228)
* ALLO - Allocate sufficient disk space to receive a file.
* APPE - Append.
* AUTH - Authentication/Security Mechanism (RFC 2228)
* CCC - Clear Command Channel (RFC 2228)
* CDUP - Change to Parent Directory.
* CONF - Confidentiality Protection Command (RFC 697)
* CWD - Change working directory.
* DELE - Delete file.
* ENC - Privacy Protected Channel (RFC 2228)
* EPRT - Specifies an extended address and port to which the server should connect. (RFC 2428)
* EPSV - Enter extended passive mode. (RFC 2428)
* FEAT - Get the feature list implemented by the server. (RFC 2389)
* HELP - Returns usage documentation on a command if specified, else a general help document is returned.
* LAND - Language Negotiation (RFC 2640)
* LIST - Returns information of a file or directory if specified, else information of the current working directory is returned.
* LPRT - Specifies a long address and port to which the server should connect. (RFC 1639)
* LPSV - Enter long passive mode. (RFC 1639)
* MDTM - Return the last-modified time of a specified file. (RFC 3659)
* MIC - Integrity Protected Command (RFC 2228)
* MKD - Make directory.
* MLSD - Provides data about exactly the object named on its command line, and no others. (RFC 3659)
* MLST - Lists the contents of a directory if a directory is named. (RFC 3659)
* MODE - Sets the transfer mode (Stream, Block, or Compressed).
* NLST - Returns a list of file names in a specified directory.
* NOOP - No operation (dummy packet; used mostly on keepalives).
* OPTS - Select options for a feature. (RFC 2389)
* PASS - Authentication password.
* PASV - Enter passive mode.
* PBSZ - Protection Buffer Size (RFC 2228)
* PORT - Specifies an address and port to which the server should connect.
* PWD - Print working directory. Returns the current directory of the host.
* QUIT - Disconnect.
* REIN - Re initializes the connection.
* REST - Restart transfer from the specified point.
* RETR - Retrieve (download) a remote file.
* RMD - Remove a directory.
* RNFR - Rename from.
* RNTO - Rename to.
* SITE - Sends site specific commands to remote server.
* SIZE - Return the size of a file. (RFC 3659)
* SMNT - Mount file structure.
* STAT - Returns the current status.
* STOR - Store (upload) a file.
* STOU - Store file uniquely.
* STRU - Set file transfer structure.
* SYST - Return system type.
* TYPE - Sets the transfer mode (ASCII/Binary).
* USER - Authentication username.