FTP Server Commands And Error Codes Cheatsheet

FTP Server Commands
FTP Server Commands

FTP- The File Transfer Protocol is a standard network protocol used for the transfer of computer files between a client and server on a computer network.

FTP is built on a client-server model architecture using separate control and data connections between the client and the server.

In this article you will find FTP Server Commands And Error Codes List

FTP server return codes always have three digits, and each digit has a special meaning.

1xx – Positive Preliminary reply
The requested action is being initiated, expect another reply before proceeding with a new command. (The user-process sending another command before the completion reply would be in violation of protocol, but server-FTP processes should queue any commands that arrive while a preceding command is in progress).

This type of reply can be used to indicate that the command was accepted and the user-process may now pay attention to the data connections, for implementations where simultaneous monitoring is difficult. The server-FTP process may send at most, one 1xx reply per command.

2xx – Positive Completion reply
The requested action has been successfully completed. A new request may be initiated.

3xx – Positive Intermediate reply
The command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. The user should send another command specifying this information. This reply is used in command sequence groups.

4xx – Transient Negative Completion reply
The command was not accepted and the requested action did not take place, but the error condition is temporary and the action may be requested again. The user should return to the beginning of the command sequence, if any.

It is difficult to assign a meaning to “transient”, particularly when two distinct sites (Server- and User-processes) have to agree on the interpretation. Each reply in the 4xx category might have a slightly different time value, but the intent is that the user-process is encouraged to try again.

A rule of thumb in determining if a reply fits into the 4xx or the 5xx (Permanent Negative) category is that replies are 4xx if the commands can be repeated without any change in command form or in properties of the User or Server (e.g., the command is spelled the same with the same arguments used; the user does not change his file access or user name; the server does not put up a new implementation.)

5xx – Permanent Negative Completion reply
The command was not accepted and the requested action did not take place. The User-process is discouraged from repeating the exact request (in the same sequence). Even some “permanent” error conditions can be corrected, so the human user may want to direct his User-process to reinitiate the command sequence by direct action at some point in the future (e.g., after the spelling has been changed, or the user has altered his directory status.)

6xx – Protected reply
The RFC 2228 introduced the concept of protected replies to increase security over the FTP communications. The 6xx replies are Base64 encoded protected messages that serves as responses to secure commands. When properly decoded, these replies fall into the above categories.

Also Read- Learn TCP/IP And Routers

The second digit is a grouping digit and encodes the following information:

Range Purpose

  • x0x Syntax
    These replies refer to syntax errors, syntactically correct commands that don’t fit any functional category, unimplemented or superfluous commands.
  • x1x Information
    These are replies to requests for information, such as status or help.
  • x2x Connections
    Replies referring to the control and data connections.
  • x3x Authentication and accounting
    Replies for the login process and accounting procedures.
  • x4x Unspecified as of RFC 959.
  • x5x File system
    These replies indicate the status of the Server file system vis-a-vis the requested transfer or other file system action.

Below is a list of all known return codes that may be issued by an FTP server.

  • 100 Series The requested action is being initiated, expect another reply before proceeding with a new command
  • 110 Restart marker reply. 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).
  • 230 User logged in, proceed. Logged out if appropriate.
  • 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.
  • 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.
  • 600 Series Replies regarding confidentiality and integrity
  • 631 Integrity protected reply.
  • 632 Confidentiality and integrity protected reply.
  • 633 Confidentiality protected reply.
  • 10000 Series Common Winsock Error Codes (These are not FTP return codes)
  • 10054 Connection reset by peer. The connection was forcibly closed by the remote host.
  • 10060 Cannot connect to remote server.
  • 10061 Cannot connect to remote server. The connection is actively refused by the server.
  • 10066 Directory not empty.
  • 10068 Too many users, server is full.

Important FTP Commands Cheat sheet

A list of FTP commands that may be sent to an FTP server, including all commands that are standardized in RFC 959 by the IETF (Internet Engineering Task Force).

RFC-  Stands for Request for Comments

  • Command         RFC                      Description       
  • ABOR                                            Abort an active file transfer.
  • ACCT                                             Account information.
  • ADAT                RFC 2228          Authentication/Security Data
  • ALLO                                             Allocate sufficient disk space to receive a file.
  • APPE                                             Append (with create)
  • AUTH               RFC 2228           Authentication/Security Mechanism
  • AVBL                                             Streamlined FTP Command Extensions Get the available space
  • CCC                   RFC 2228          Clear Command Channel
  • CDUP                                            Change to Parent Directory.
  • CONF                RFC 2228          Confidentiality Protection Command
  • CSID                                              Streamlined FTP Command Extensions Client / Server Identification
  • CWD                 RFC 697             Change working directory.
  • DELE                                             Delete file.
  • DSIZ                                              Streamlined FTP Command Extensions Get the directory size
  • ENC                  RFC 2228          Privacy Protected Channel
  • EPRT                RFC 2428          Specifies an extended address and port to which the server should connect.
  • EPSV                RFC 2428           Enter extended passive mode.
  • FEAT                RFC 2389           Get the feature list implemented by the server.
  • HELP                                             Returns usage documentation on a command if specified, else a general help document is returned.
  • HOST               RFC 7151             Identify desired virtual host on server, by name.
  • LANG               RFC 2640           Language Negotiation
  • LIST                                               Returns information of a file or directory if specified, else information of the current working directory is returned.
  • LPRT                RFC 1639            Specifies a long address and port to which the server should connect.
  • LPSV                RFC 1639             Enter long passive mode.
  • MDTM             RFC 3659            Return the last-modified time of a specified file.
  • MFCT       The ‘MFMT’, ‘MFCT’, and ‘MFF’ Command Extensions for FTP      Modify the creation time of a file.
  • MFF          The ‘MFMT’, ‘MFCT’, and ‘MFF’ Command Extensions for FTP      Modify fact (the last modification time, creation time, UNIX group/owner/mode of a file).
  • MFMT      The ‘MFMT’, ‘MFCT’, and ‘MFF’ Command Extensions for FTP      Modify the last modification time of a file.
  • MIC                 RFC 2228             Integrity Protected Command
  • MKD                                               Make directory.
  • MLSD             RFC 3659              Lists the contents of a directory if a directory is named.
  • MLST             RFC 3659               Provides data about exactly the object named on its command line, and no others.
  • 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              RFC 2389              Select options for a feature (for example OPTS UTF8 ON).
  • PASS                                               Authentication password.
  • PASV                                              Enter passive mode.
  • PBSZ              RFC 2228              Protection Buffer Size
  • PORT                                             Specifies an address and port to which the server should connect.
  • PROT             RFC 2228              Data Channel Protection Level.
  • PWD                                               Print working directory. Returns the current directory of the host.
  • QUIT                                              Disconnect.
  • REIN                                              Re initializes the connection.
  • REST             RFC 3659              Restart transfer from the specified point.
  • RETR                                            Retrieve a copy of the file
  • RMD                                             Remove a directory.
  • RMDA                                          Streamlined FTP Command Extensions Remove a directory tree
  • RNFR                                           Rename from.
  • RNTO                                           Rename to.
  • SITE                                             Sends site specific commands to remote server (like SITE IDLE 60 or SITE UMASK 002). Inspect SITE
  • HELP                                           Output for complete list of supported commands.
  • SIZE              RFC 3659             Return the size of a file.
  • SMNT                                          Mount file structure.
  • SPSV        FTP Extension Allowing IP Forwarding (NATs)        Use single port passive mode (only one TCP port number for both control connections and passive-mode data connections)
  • STAT                                           Returns the current status.
  • STOR                                          Accept the data and to store the data as a file at the server site
  • STOU                                          Store file uniquely.
  • STRU                                          Set file transfer structure.
  • SYST                                           Return system type.
  • THMB                                        Streamlined FTP Command Extensions Get a thumbnail of a remote image file
  • TYPE                                          Sets the transfer mode (ASCII/Binary).
  • USER                                         Authentication username.
  • XCUP             RFC 775            Change to the parent of the current working directory
  • XMKD            RFC 775            Make a directory
  • XPWD            RFC 775            Print the current working directory
  • XRCP             RFC 743
  • XRMD           RFC 775            Remove the directory
  • XRSQ            RFC 743
  • XSEM            RFC 737            Send, mail if cannot
  • XSEN             RFC 737            Send to terminal

Join Our Club

Enter your Email address to receive notifications | Join over Million Followers

Leave a Reply
Previous Article
Linux And Windows

Microsoft Announces Built-in Linux Kernel For Windows 10 Insider

Next Article
Mozilla Thunderbird

Mozilla Thunderbird Fixes Buffer Overflow Vulnerability

Related Posts