FTP
FTP
FTP
The full form of FTP is File Transfer Protocol. It is a standard internet protocol provided
by TCP/IP which is used for transmitting the files from one system to another system.
The main purpose of FTP is for transferring the web page files from one system to the
computer which acts as a server for other computers on the internet. It is also helpful for
downloading the files to compute from other servers.
Features
Data representation
File organization and Data structures
Transmission modes
Error control
Access control
TCP Connections
For file transferring, two TCP connections are used which are as follows −
When an FTP session is started between a client and servers, the client initiates a control TCP
connection with the server side. The client sends control information over this. When the
server receives this, it initiates a data connection to the client side. At a time only one file can
be sent over one data connection. FTP has to maintain information about its user throughout
the session.
Data Structures
FTP Servers
FTP servers are divided into two parts for separating the general public users from more
private users −
Anonymous Server − FTP sites allow anonymous FTP do not require a password for
access. We have to log in as anonymous and enter our email address as password.
Non-anonymous server − If we are using a non-anonymous server, then we will log
in as you and give our password.
FTP Clients
FTP runs on a client/server model. For using FTP we need client software to run our PC. To
start the FTP session, we have to run the FTP client software and contact the FTP server from
where we want to download files from.
FTP commands
FTP commands
Some useful FTP commands available on most systems include:
ascii Switch to ASCII mode. ASCII mode is the default mode; use it for
transferring text files.
binary Switch to binary mode. Use to transfer binary files, including files
ending in .zip, .tar, .Z, and .gz, executable programs, and
graphics files.
bye (or qui Close the connection to the remote computer and exit FTP.
t)
dir (or ls) List the files in the current directory on the remote computer.
get Copy a file from the remote computer to the local computer.
mget Copy multiple files from the remote computer to the local
computer.
mput Copy multiple files from the local computer to the remote
computer.
prompt Turn on (or turn off) file transfer prompting. Often used to turn off
prompting when using mdel, mput, or mget so that you are not
required to confirm the transfer of each file before it is
transferred.
put Copy a file from the local computer to the remote computer.
rmdir Remove a directory on the remote host (the directory usually has
to be empty).
user Log into the remote computer to which you are currently
connected. FTP will ask for a login name and possibly a password.
Working Procedure
Clients initiate a conversation with servers by requesting to download a file. With the help of
FTP, a client can delete, upload, download, rename etc and even copy files on a server. A user
typically needs to log on to the FTP server to use the available content.
Advantages
Speed
Efficient
Security
Back & Forth movement
Disadvantages