AMZ DIGICOM

Digital Communication

AMZ DIGICOM

Digital Communication

FTP commands: overview of FTP commands

PARTAGEZ

FTP commands allow you to easily transfer and download data. A code is sent in response to FTP commands.

What are FTP commands and what are they used for?

Since 1971, the network protocol File Transfer Protocol (FTP), defined by RFC 959, is responsible for transferring files online. FTP initiates downloads and thus regulates data traffic between a terminal and a server or a Fileserver. It operates at the application layer, ie the seventh layer of the OSI model, and can be controlled by special FTP programs like FileZilla. Data transfer takes place through two channels, called control channel and data channel. It is to control this transfer that FTP commands are exchanged between the client and the server. The control channel used for this exchange is TCP port 21.

FTP commands are text-based. Most are defined in RFC 959. In particular, they allow to send, receive, modify or delete files or directories. While many FTP commands are recognized and used by almost all common programs, some FTP commands are only made available by a particular client. These additional commands are intended to improve usability and provide users with even more powerful tools. Requesting FTP commands through the client always results in a response from the server in the form of a code.

The perfect solution adapted to your needs: choose the IONOS Cloud server and benefit from a high-performance infrastructure, maximum scalability and advantageous pricing.

What are the most important FTP commands?

As already mentioned, the list of possible and existing FTP commands is very long. However, it is not necessary to know them all to use FTP on a daily basis. Here you will find a selection of 25 most important FTP commands, listed in alphabetical order. This list represents a good basis for using this network protocol, in particular for setting up your own FTP server. Some of these commands can also be used when working with the Trivial File Transfer Protocol (TFTP).

The 25 Most Important FTP Commands

FTP Commands Explanation
ABOR cancel the previous command
ACTC gives information about an account
ASCII switches from binary mode to ASCII mode (default setting without FTP commands is ASCII, text documents are sent via this mode; binary mode is among other things responsible for images and programs)
BINARY switch from ASCII mode to binary mode
CD change the current directory (CD for « Change Directory »)
CDUP automatically switch to the original directory
CWD change the working directory
DELE delete a file (DELE for « Delete »)
FEAT list all server features
GET requests a file that is on the server (the file name must follow the command)
HELP list all FTP commands used by the server
MKD created a new directory
PASS enter the password to access a server
PASV switch to a passive FTP connection
PORT passes the address of the FTP port to which the server should address
PUT sends a local file to the FTP server (the file name must follow the command)
QUIT terminates the connection between the client and the server
REST restarts a transfer started from a defined point
RMD remove a specific directory
SIZE indicates the exact size of a file
STAT provides information about the current server and connection status
STOR copy a file to the server
SYST asks what operating system is installed on the server
KIND set the current transfer mode (binary or ASCII)
USER changes the user accessing the server (then requires the user’s password)

FTP commands and their RFCs

Here you will find an overview of the 25 most important FTP commands and their Requests for Commands (RFC):

FTP Commands Request for Commands (RFC)
ABOR RFC 959
ACTC RFC 959
ASCII RFC 959
BINARY RFC 959
CD RFC 959
CDUP RFC 959
CWD RFC 697
DELE RFC 959
FEAT RFC 2389
GET RFC 959
HELP RFC 959
MKD RFC 959
PASS RFC 959
PASV RFC 959
PORT RFC 959
PUT RFC 959
QUIT RFC 959
REST RFC 3659
RMD RFC 959
SIZE RFC 3659
STAT RFC 959
STOR RFC 959
SYST RFC 959
KIND RFC 959
USER RFC 959

Are you looking for accommodation with flexible performance? IONOS web hosting is for you. You also get your own domain and an SSL certificate. DDoS protection and automatic data backup are also included.

What are FTP commands for Linux?

It is also possible to use FTP commands under Linux. For example, you can set up an Ubuntu FTP server, configure your own Debian FTP server or even use Linux with a client. In addition to the FTP commands discussed above, there are a few Linux-specific options you can use in command line. These include the following in particular:

  • -4: use IPv4 exclusively to contact a host
  • -6: use IPv6 exclusively
  • -d : activate the debugging function
  • -e: prevent command changes and history support
  • -g: disables typing generic names for files
  • -i: prevent prompts being sent while transferring multiple files
  • -n: prevent automatic connection attempts
  • -p: switch to passive mode for data transfers
  • -v: get all server responses, including transfer statistics

What are the corresponding codes?

When you send FTP commands, the server always responds with a code. This consists of a three-digit number and is sent as an HTTP response. The codes are divided into five categories:

  • 100-199: if one of these codes appears, the FTP command has normally been executed successfully. However, the server requests another command.
  • 200-299: these codes also signal correct execution of the corresponding FTP command. No further action is necessary.
  • 300-399: these codes also indicate successful execution of the FTP command. However, other information is required to be able to complete the processing of the order.
  • 400-499: if any of these codes appear as a response, the command was not executed. The problem however seems temporary, a new instruction may possibly give a better result.
  • 500-599: these codes indicate that the FTP command was not executed. Trying again would result in the same error message.

Summary: Using FTP Commands

The FTP commands mentioned above allow you to transfer and download data successfully. This can for example allow you to edit your own website. However, as the username and password are not encrypted with FTP, it is recommended that you use the SSH File Transfer Protocol (SFTP) instead. This is based on FTP, but offers much more powerful protection mechanisms. We also recommend that you check the port beforehand.

For reliable and secure hosting: rent your SFTP server from IONOS and enjoy automatic daily backups and flexible rates for Windows and Linux hosting.

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact