File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another over a TCP-based network, such as the Internet. FTP is built on a client-server architecture and utilizes separate control and data connections between the client and server. FTP users may authenticate themselves using a clear-text sign-in protocol but can connect anonymously if the server is configured to allow it.
The first FTP client applications were interactive command-line tools, implementing standard commands and syntax. Graphical user interface clients have since been developed for many of the popular desktop operating systems in use today. and published as RFC 114 on 16 April 1971, before TCP and IP even existed. It was later replaced by RFC 765 (June 1980) and RFC 959 (October 1985), the current specification. Several proposed standards amend RFC 959, for example RFC 2228 (June 1997) proposes security extensions and RFC 2428 (September 1998) adds support for IPv6 and defines a new type of passive mode.
FTP operates on the application layer of the OSI model, and is used to transfer files using TCP/IP. This connection, called the control connection, remains open for the duration of the session, with a second connection, called the data connection, either opened by the server from its port 20 to a negotiated client port (active mode) or opened by the client from an arbitrary port to a negotiated server port (passive mode) as required to transfer file data. The control connection is used for session administration (i.e., commands, identification, passwords) exchanged between the client and server using a telnet-like protocol. For example "RETR filename" would transfer the specified file from the server to the client. Due to this two-port structure, FTP is considered an out-of-band, as opposed to an in-band protocol such as HTTP.
The server responds on the control connection with three digit status codes in ASCII with an optional text message, for example "200" (or "200 OK.") means that the last command was successful. The numbers represent the code number and the optional text represent explanations (e.g.,
FTP can be run in active or passive mode, which determine how the data connection is established. In active mode, the client sends the server the IP address and port number on which the client will listen, and the server initiates the TCP connection. In situations where the client is behind a firewall and unable to accept incoming TCP connections, passive mode may be used. In this mode the client sends a PASV command to the server and receives an IP address and port number in return. The client uses these to open the data connection to the server. Both modes were updated in September 1998 to add support for IPv6. Other changes were made to passive mode at that time, making it extended passive mode.
While transferring data over the network, four data representations can be used:
FTP was not designed to encrypt its traffic; all transmissions are in clear text, and user names, passwords, commands and data can be easily read by anyone able to perform packet capture (sniffing) on the network. This problem is common to many Internet Protocol specifications (such as SMTP, Telnet, POP and IMAP) designed prior to the creation of encryption mechanisms such as TLS or SSL. A common solution to this problem is use of the "secure", TLS-protected versions of the insecure protocols (e.g. FTPS for FTP, TelnetS for Telnet, etc.) or selection of a different, more secure protocol that can handle the job, such as the SFTP/SCP tools included with most implementations of the Secure Shell protocol.
FTP URL syntax is described in RFC1738, taking the form:
ftp://[
(The bracketed parts are optional.) For example:
ftp://public.ftp-servers.example.com/mydirectory/myfile.txt
or:
ftp://user001:secretpassword@private.ftp-servers.example.com/mydirectory/myfile.txt
More details on specifying a user name and password may be found in the browsers' documentation, such as, for example, Firefox and Internet Explorer.
By default, most web browsers use passive (PASV) mode, which more easily traverses end-user firewalls.
There are two approaches to this problem. One is that the FTP client and FTP server use the PASV command, which causes the data connection to be established from the FTP client to the server. This is widely used by modern FTP clients. Another approach is for the NAT to alter the values of the PORT command, using an application-level gateway for this purpose.
SFTP, or secure FTP, is a program that uses SSH to transfer files. Unlike standard FTP, it encrypts both commands and data, preventing passwords and sensitive information from being transmitted in the clear over the network. It is functionally similar to FTP, but because it uses a different protocol, you can't use a standard FTP client to talk to an SFTP server, nor can you connect to an FTP server with a client that supports only SFTP.
===FTP over SSH (not SFTP)=== FTP over SSH (not SFTP) refers to the practice of tunneling a normal FTP session over an SSH connection.
Because FTP uses multiple TCP connections (unusual for a TCP/IP protocol that is still in use), it is particularly difficult to tunnel over SSH. With many SSH clients, attempting to set up a tunnel for the control channel (the initial client-to-server connection on port 21) will protect only that channel; when data is transferred, the FTP software at either end will set up new TCP connections (data channels), which bypass the SSH connection, and thus have no confidentiality, integrity protection, etc.
Otherwise, it is necessary for the SSH client software to have specific knowledge of the FTP protocol, and monitor and rewrite FTP control channel messages and autonomously open new packet forwardings for FTP data channels. Version 3 of SSH Communications Security's software suite, the GPL licensed FONC, and Co:Z FTPSSH Proxy are three software packages that support this mode.
FTP over SSH is sometimes referred to as secure FTP; this should not be confused with other methods of securing FTP, such as with SSL/TLS (FTPS). Other methods of transferring files using SSH that are not related to FTP include SFTP and SCP; in each of these, the entire conversation (credentials and data) is always protected by the SSH protocol.
{|class="wikitable sortable" style="width: 100%" |- ! Command ! RFC !class="unsortable"|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. |- | AUTH | RFC 2228 | Authentication/Security Mechanism |- | CCC | RFC 2228 | Clear Command Channel |- | CDUP | | Change to Parent Directory. |- | CONF | RFC 2228 | Confidentiality Protection Command |- | CWD | | Change working directory. |- | DELE | | Delete file. |- | 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. |- | 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. |- | 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. |- | 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 | | Restart transfer from the specified point. |- | RETR | | Transfer a copy of the file |- | RMD | | Remove a directory. |- | RNFR | | Rename from. |- | RNTO | | Rename to. |- | SITE | | Sends site specific commands to remote server. |- | SIZE | RFC 3659 | Return the size of a file. |- | SMNT | | Mount file structure. |- | 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. |- | TYPE | | Sets the transfer mode (ASCII/Binary). |- | USER | | Authentication username. |}
Below is a summary of the reply codes that may be returned by an FTP server. These codes have been standardized in RFC 959 by the IETF. The reply code is a three-digit value.
The first digit of the reply code is used to indicate one of three possible outcomes, 1) success, 2) failure, and 3) error or incomplete:
The second digit defines the kind of error:
The third digit of the reply code is used to provide additional detail for each of the categories defined by the second digit.
Category:FTP FTP commands Category:Clear text protocols Category:Network file transfer protocols Category:History of the Internet Category:Application layer protocols Category:Internet protocols Category:Internet standards Category:Unix network-related software
af:File Transfer Protocol als:File Transfer Protocol ar:بروتوكول نقل الملفات az:FTP bn:ফাইল ট্রান্সফার প্রোটোকল be-x-old:FTP bar:File Transfer Protocol bs:File Transfer Protocol bg:Протокол за трансфер на файлове ca:Protocol de transferència de fitxers cs:File Transfer Protocol da:FTP de:File Transfer Protocol et:Failiedastusprotokoll el:File Transfer Protocol es:File Transfer Protocol eo:Dosiero-Transiga Protokolo eu:FTP fa:افتیپی fr:File Transfer Protocol ga:FTP gl:File Transfer Protocol ko:파일 전송 프로토콜 hy:Նիշքերի փոխանցման կանխագիր hi:संचिका स्थानांतरण प्रोटोकॉल hr:FTP id:Protokol Transfer Berkas ia:File Transfer Protocol is:FTP it:File Transfer Protocol he:File Transfer Protocol ka:FTP kk:FTP ku:FTP lv:FTP lt:FTP hu:File Transfer Protocol mk:Протокол за пренос на податотеки ml:ഫയൽ ട്രാൻസ്ഫർ പ്രോട്ടോകോൾ ms:Protokol Pindahan Fail nl:File Transfer Protocol ja:File Transfer Protocol no:FTP nn:File Transfer Protocol mhr:FTP uz:FTP pl:File Transfer Protocol pt:File Transfer Protocol ro:Protocol de transfer de fișiere ru:FTP sq:File Transfer Protocol simple:FTP sk:File Transfer Protocol sl:FTP sr:FTP sh:FTP fi:FTP sv:File Transfer Protocol tl:FTP ta:கோப்புப் பரிமாற்ற நெறிமுறை th:เอฟทีพี tg:FTP tr:Dosya aktarım iletişim kuralı uk:FTP ur:تبادلۂ ملف دستور vi:FTP fiu-vro:FTP yo:File Transfer Protocol zh:文件传输协议This text is licensed under the Creative Commons CC-BY-SA License. This text was originally published on Wikipedia and was developed by the Wikipedia community.
The World News (WN) Network, has created this privacy statement in order to demonstrate our firm commitment to user privacy. The following discloses our information gathering and dissemination practices for wn.com, as well as e-mail newsletters.
We do not collect personally identifiable information about you, except when you provide it to us. For example, if you submit an inquiry to us or sign up for our newsletter, you may be asked to provide certain information such as your contact details (name, e-mail address, mailing address, etc.).
When you submit your personally identifiable information through wn.com, you are giving your consent to the collection, use and disclosure of your personal information as set forth in this Privacy Policy. If you would prefer that we not collect any personally identifiable information from you, please do not provide us with any such information. We will not sell or rent your personally identifiable information to third parties without your consent, except as otherwise disclosed in this Privacy Policy.
Except as otherwise disclosed in this Privacy Policy, we will use the information you provide us only for the purpose of responding to your inquiry or in connection with the service for which you provided such information. We may forward your contact information and inquiry to our affiliates and other divisions of our company that we feel can best address your inquiry or provide you with the requested service. We may also use the information you provide in aggregate form for internal business purposes, such as generating statistics and developing marketing plans. We may share or transfer such non-personally identifiable information with or to our affiliates, licensees, agents and partners.
We may retain other companies and individuals to perform functions on our behalf. Such third parties may be provided with access to personally identifiable information needed to perform their functions, but may not use such information for any other purpose.
In addition, we may disclose any information, including personally identifiable information, we deem necessary, in our sole discretion, to comply with any applicable law, regulation, legal proceeding or governmental request.
We do not want you to receive unwanted e-mail from us. We try to make it easy to opt-out of any service you have asked to receive. If you sign-up to our e-mail newsletters we do not sell, exchange or give your e-mail address to a third party.
E-mail addresses are collected via the wn.com web site. Users have to physically opt-in to receive the wn.com newsletter and a verification e-mail is sent. wn.com is clearly and conspicuously named at the point of
collection.If you no longer wish to receive our newsletter and promotional communications, you may opt-out of receiving them by following the instructions included in each newsletter or communication or by e-mailing us at michaelw(at)wn.com
The security of your personal information is important to us. We follow generally accepted industry standards to protect the personal information submitted to us, both during registration and once we receive it. No method of transmission over the Internet, or method of electronic storage, is 100 percent secure, however. Therefore, though we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.
If we decide to change our e-mail practices, we will post those changes to this privacy statement, the homepage, and other places we think appropriate so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we disclose it.
If we make material changes to our e-mail practices, we will notify you here, by e-mail, and by means of a notice on our home page.
The advertising banners and other forms of advertising appearing on this Web site are sometimes delivered to you, on our behalf, by a third party. In the course of serving advertisements to this site, the third party may place or recognize a unique cookie on your browser. For more information on cookies, you can visit www.cookiecentral.com.
As we continue to develop our business, we might sell certain aspects of our entities or assets. In such transactions, user information, including personally identifiable information, generally is one of the transferred business assets, and by submitting your personal information on Wn.com you agree that your data may be transferred to such parties in these circumstances.