File Transfer Protocol(FTP):
- FTP stands for File Transfer Protocol.
- It is a standard internet protocol provided by TCP/IP used for
transmitting the files from one host to another.
- It is mainly used for transferring the web page files from
their creator to the computer that acts as a server for other
computers on the internet.
- It is also used for downloading the files to compute from other
servers.
Objectives of FTP:
- It provides the sharing of files.
- It is used to encourage the use of remote computers.
- It transfers the data more reliably and efficiently.
Features of FTP:
- Data representation
- File organization and Data structures
- Transmission modes
- Error control
- Access control
File operation:
- FTP uses client/server model for communication.
- Two TCP connections are used for file transfer.
- On one connection control signals (commands and responses) are
exchanged and the other connection is used for actual data
transfer.The two connections are called control connection and data
connection.
Control connection:
- For sending control information like user
identification,password,commands to change the remote
directory,commands to retrieve and store files,etc ftp makes use of
control connection.
- The control connection is initiated on port number 21.
Data connection:
- For sending the actual file,FTP makes use of data
connection.
- A data connection is initiated on port number 20
FTP session:
- When 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.Only one
file can be sent over one data connection.FTP needs to maintain a
state about its user throughout the session.
Data Structures:
FTP allows 3 types of data structures.
- File structure: It is continuous sequence of
data bytes.
- Record structure:In this,the file is made up
of sequential records.
- page structure:In this,the file is made up of
independent indexed pages.
FTP Servers:
To separate the general public users from the more private
users,FTP servers are divided into 2 parts:
- Anonymous Server: FTP sites that allows
anonymous FTP do not require a password for access.You only have to
log in as anonymous and enter your email address as password.
- Non-anonymous server:If you use a
non-anonymous server,then you will log in as yourself and give your
password.
FTP Clients:
- FTP runs on client/server model.For using FTP you need client
software to run your PC.
- To begin an FTP session,you run the FTP client software and
contact the FTP server from where you want to download files
from.
FTP commands:
Some of the FTP commands are:
USER - This command sends the user identification to the
server.
PASS - This command sends the user password to the server.
PWD - This command causes the name of the current working
directory to be returned in the reply.
Working Procedure:
Clients initiate a conversations with servers by requesting to
download a file.Using FTP, a client can
upload,download,delete,rename etc and copy files on a server.A user
typically needs to log on to the FTP server to use the available
content.
Advantages of FTP:
- speed
- Efficient
- Security
- Back & Forth movement
Disadvantages of FTP:
- It is not compatible with every system.
- Attackers can quickly identify the FTP password
- Does not allow to run simultaneous transfers to multiple
receivers.