File Transfer Protocol

Published on January 2017 | Categories: Documents | Downloads: 60 | Comments: 0 | Views: 372
of 6
Download PDF   Embed   Report

Comments

Content

 

File Transfer Protocol (FTP) is a standard network protocol used to exchange and

manipulate files over a TCP/IP based network, such as the Internet Internet.. FTP is built on a client-server architecture client-server  architecture and utilizes separate control and data connections between the client and server applications. Applications were originally interactive command-line tools too ls wi with th a st stand andard ardize ized d com comman mand d syn syntax tax,, but gra graphi phical cal user user int interf erface acess hav havee bee been n developed for all desktop operating systems in use today. FTP is also often used as an application component to automatically transfer files for program internal functions. FTP can be used with user-based password authenticat authentication ion or with anonymous user access. The Trivial File Transfer Protocol (TFTP) is a similar, but simplified, not interoperable, and unauthenticated version of FTP. History

RFC 114 was released on 16 April 1971 and was the original specification of the File Transfer Protocol (FTP). It was obsoleted by RFC 765 on June 1980, which in turn was obsoleted by RFC 959 on October 1985, which is current specification. Several proposed standards stand ards ammend that RFC, for exam example ple RFC 2228 of June 1997 proposes security extensions and RFC 2428 of September 1998 adds support for  IPv6 and defines a new type of passive mode. Use

As outlined by its RFC RFC,, FTP is used to: •

Promote sharing of files (computer programs and/or data).



Encourage indirect or implicit use of remote of remote computers computers..

 



Shield a user from variations in file storage systems among different hosts hosts.. (The user does not need to know that what the type of file system is.)



Transfer data Transfer  data reliably, and efficiently.

Protocol overview A client makes a connection to the server using TCP port 21.

This connection, the control connection, connection, remains open for the duration of the session, with a second connection on port 20 opened as required to transfer file data. Commands are sent by the client over the control connection in ASCII and terminated by a carriage return and line feed. For example "RETR  filename"  filename" would transfer the specified file from the server to the client. 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. A file transfer in progress over the data connection can be aborted using an interrupt message sent over the control connection. FTP can be run in activ activee mode or  or    passive passive mode, wh whic ich h co cont ntro roll ho how w th thee se seco cond nd connection is opened. In active mode the client sends the server the IP address port number the client is to use for the data connection and the server opens the connection. Passive mode was devised for use where the client is behind a firewall and unable to accept incoming TCP connections. The server sends the client an IP address and port number and the the client opens the connection to the server. Both modes were updated in September 1998 to add support for  IPv6 and made some other changes to passive mode, mode. making it extended passive mode.

 

While transferring data over the network, four data representations can be used, of which only two are common: •

ASCII mode: only for plain text. (Any other form of data will be corrupted)



Binary mode: the sending machine sends each file  byte for byte and as such the recipi rec ipient ent sto stores res the byt bytest estrea ream m as it rec receiv eives es it. (Th (Thee FTP sta standa ndard rd cal calls ls thi thiss "IMAGE" or "I" mode)

The other two, EBCDIC and local file type are essentially obsolete. For text files, different format control and record structure can be selected, although these features are also rarely used now. One of three file transfer modes can also be chosen, but the default of "stream" is invariably used now. Security

The original FTP specification is an inherently unsecure method of transferring files  because there is no method specified for transferring data in an encrypted fashion. This means that under most network configurations, user names, passwords, FTP commands and transferred files can be captured by anyone on the same network using a  packet   packet  sniffer . This is a problem common to many Internet protocol specifications written prior  to the creation of SSL of  SSL,, such as HTTP HTTP,, SMTP and Telnet Telnet.. The common solution to this  problem is to use either  SFTP (SSH File Transfer Protocol), or  FTPS (FTP over SSL), which adds SSL or TLS or TLS  encryption to FTP as specified in RFC 4217 4217.. Anonymous FTP

 

A host that provides an FTP service may additionally provide anonymous FTP access. Users typically login to the service with an 'anonymous' account when prompted for user  name. Although users are commonly asked to send their  email address in lieu of a  password, little to no verification is actually performed on the supplied data. As modern FTP clients typically hide the anonymous login process from the user, the ftp client will supply dummy data as the password (since the user's email address may not be known to the application). The Gopher protocol has been suggested as an alternative to anonymous FTP, as well as Trivial File Transfer Protocol and File Service Protocol Protocol..[citation needed ] Remote FTP or FTP Mail

Where FTP access is restricted, a remote FTP (or FTP Mail) service can be used to circumvent the problem. An e-mail containing the FTP commands to be performed is sent to a remote FTP server, which is a mail server that parses the incoming e-mail, executes th thee FT FTP P co comm mman ands ds,, an and d se send ndss ba back ck an ee-ma mail il wi with th an any y down downlo load aded ed fi file less as an attachment. Obviously this is less flexible than an ftp client, as it is not possible to view directories interactively or to modify commands, and there can also be problems with large file attachments in the response not getting through mail servers. As most internet users these days have ready access to FTP, this procedure is no longer in everyday use. FTP and web browsers

Most recent web browsers and file managers can connect to FTP servers, although they may lack the support for protocol extensions such as FTPS FTPS.. This allows manipulation of 

 

remote files over FTP through an interface similar to that used for local files. This is done via

an

FTP

URL URL,,

which

takes

the

form

ftp(s)://< ftpserveraddress  ftpserveraddress> > (e.g.,

ftp://ftp.gimp.org/)). A password can optionally be ftp://ftp.gimp.org/

given in the

URL, e.g.:

 ftpserveraddress>:< ftp(s)://<login>:< ftp(s)://<login >:< password >@< >@< ftpserveraddress >:< port >. >. Most web-brow web-browsers sers requi require re the use of passive mode FTP, which not all FTP servers are capable of handling. Some  browsers allow only the downloading of files, but offer no way to upload files to the server. FTP and NAT devices

The representation of the IP addresses and port numbers in the PORT command and PASV reply poses another challenge for  Network for  Network address translation (NAT) devices in handling FTP. The NAT device must alter these values, so that they contain the IP ad addr dres esss of th thee NA NATT-ed ed clie client nt,, an and d a po port rt ch chos osen en by th thee NA NAT T de devi vice ce fo forr th thee da data ta connection. The new address and port will probably differ in length in their decimal representation from the original address and port. This means that altering the values on the control connection by the NAT device must be done carefully, changing the TCP TCP   Sequence and Acknowledgment fields for all subsequent packets. Such translation is not usually performed in most NAT devices, but special application layer gateways exist for  this purpose. 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 channel  (the initial client-to-server connection on port to set up a tunnel for the control channel (the 21) will protect only that channel; when data is transferred, the FTP software at either end will set up new TCP connections (data (data channels) channels) which will bypass the SSH connection, and thus have no confidentiality confidentiality,, integrity protection 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 op en ne new w fo forw rwar ardi ding ngss for for FT FTP P da data ta ch chan anne nels ls.. Ve Vers rsio ion n 3 of  SSH Commu Communica nications tions   Security'ss software suite, and the GPL licensed FONC are two software packages that Security' support this mode. FTP over SSH is sometimes referred to as secure FTP; this should not be confused with ot othe herr me meth thod odss of se secu curi ring ng FT FTP, P, such such as wi with th SS SSL/ L/TL TLS S ( FTPS FTPS). ). Ot Other her metho methods ds of  transferring files using SSH that are not related to FTP include SFTP and SCP SCP;; in each of  these, the entire conversation (credentials and data) is always protected by the SSH  protocol.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close