SlideShare a Scribd company logo
FTP
File Transfer Protocol
       Reference:
        RFC 959
FTP Objectives
         (from RFC 959)
promote sharing of files
encourage indirect use of remote computers
shield user from variations in file storage
transfer data reliably and efficiently
“FTP, although usable directly by a user at
a terminal, is designed mainly for use by
programs”
The FTP Model
PI: Protocol Interpreter
PI: Protocol Interpreter
DTP: Data Transfer Protocol
DTP: Data Transfer Protocol          User Interface   User


                          Control
            Server PI                  User PI


File                          Data                    File
System     Server DTP                 User DTP        System
Control and Data Connections

Control functions (commands) and reply
codes are transferred over the control
connection.
All data transfer takes place over the data
connection.
The control connection must be “up” while
data transfer takes place.
Control Connection

The control connection is the “well known”
service.
The control connection uses the TELNET
protocol.
Commands and replies are all line oriented
text (default is ASCII).
Standard Connection Model


          Control

A
A         Data         B
                       B
Alternative Connection Model
  Control          Control
            A


B
B           Data             C
                             C
Access ControlCommands

USER     specify user
PASS     specify password
CWD      change directory
CDUP     change directory to parent
QUIT     logout
Transfer Parameter Commands

PORT     publish local data port
PASV     server should listen
TYPE     establish data representation
MODE     establish transfer mode
STRU     establish file structure
Service Commands

RETR   retrieve file
STOR   send file
STOU   send file and save as unique
APPE   send file and append
ABOR   abort previous service command
PWD    print working directory
LIST   transfer list of files over data link
FTP Replies

All replies are sent over control connection.
Replies are a single line containing
–   3 digit status code (sent as 3 numeric chars).
–   text message.
The FTP spec. includes support for
multiline text replies.
status code is used by programs, text is for
humans.
FTP Reply Status Code

First digit of status code indicates type of reply:
  ‘1’: Positive Preliminary Reply (got it, but wait).
  ‘2’: Positive Completion Reply (success).
  ‘3’: Positive Intermediate Reply (waiting for more
    information).
  ‘4’: Transient Negative Completion (error - try again).
  ‘5’: Permanent Negative Reply (error - can’t do).
FTP Reply Status Code

2nd digit indicates function groupings.
‘0’: Syntax (problem with command syntax).
‘1’: Information (reply to help or status cmds).
‘2’: Connections (problem with a connection).
‘3’: Authentication (problem with login).
‘4’: Unspecified.
‘5’: File system (related to file system).
3rd digit indicates specific problem within
function group.
Data Transfer Modes

STREAM: file is transmitted as a stream of
bytes.
BLOCK: file is transmitted as a series of
blocks preceded by headers containing
count and descriptor code (EOF, EOR,
restart marker).
COMPRESSED: uses a simple compression
scheme - compressed blocks are
transmitted.
RFC 959 - Please Read !

The RFC includes lots more information
and many details including:
–   parameters for commands
–   lists of reply status codes
–   protocol state diagrams
–   support for a variety of file structures
–   sample sessions

More Related Content

What's hot

File Transfer Protocol - FTP
File Transfer Protocol - FTPFile Transfer Protocol - FTP
File Transfer Protocol - FTP
MahfuzRahman94
 
Network protocals
Network protocalsNetwork protocals
Network protocals
reddivarihareesh
 
TCP/ IP
TCP/ IP TCP/ IP
Application layer protocol - Electronic Mail
Application layer protocol - Electronic MailApplication layer protocol - Electronic Mail
Application layer protocol - Electronic Mail
AmishaSahu3
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
Ramola Dhande
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
Ujjayanta Bhaumik
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
selvakumar_b1985
 
FTP
FTPFTP
File Transfer Protocol(FTP)
File Transfer Protocol(FTP)File Transfer Protocol(FTP)
File Transfer Protocol(FTP)
Varnit Yadav
 
File Transfer protocols
File Transfer protocolsFile Transfer protocols
File Transfer protocols
Aayushi Pareek
 
Lec 8(FTP Protocol)
Lec 8(FTP Protocol)Lec 8(FTP Protocol)
Lec 8(FTP Protocol)
maamir farooq
 
FTP
FTPFTP
Application layer
Application layerApplication layer
Application layer
SakthiVinoth78
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
guest029bcd
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network pptextraganesh
 
Delivery and Forwarding of IP Packets
Delivery and Forwarding of IP PacketsDelivery and Forwarding of IP Packets
Delivery and Forwarding of IP Packets
International Institute of Information Technology (I²IT)
 
Telnet ppt
Telnet pptTelnet ppt
Telnet ppt
SUNILKUMARSINGH
 
TCP/IP
TCP/IPTCP/IP

What's hot (20)

File Transfer Protocol - FTP
File Transfer Protocol - FTPFile Transfer Protocol - FTP
File Transfer Protocol - FTP
 
Dhcp ppt
Dhcp pptDhcp ppt
Dhcp ppt
 
Network protocals
Network protocalsNetwork protocals
Network protocals
 
Tcp
TcpTcp
Tcp
 
TCP/ IP
TCP/ IP TCP/ IP
TCP/ IP
 
Application layer protocol - Electronic Mail
Application layer protocol - Electronic MailApplication layer protocol - Electronic Mail
Application layer protocol - Electronic Mail
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
FTP
FTPFTP
FTP
 
File Transfer Protocol(FTP)
File Transfer Protocol(FTP)File Transfer Protocol(FTP)
File Transfer Protocol(FTP)
 
File Transfer protocols
File Transfer protocolsFile Transfer protocols
File Transfer protocols
 
Lec 8(FTP Protocol)
Lec 8(FTP Protocol)Lec 8(FTP Protocol)
Lec 8(FTP Protocol)
 
FTP
FTPFTP
FTP
 
Application layer
Application layerApplication layer
Application layer
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 
Delivery and Forwarding of IP Packets
Delivery and Forwarding of IP PacketsDelivery and Forwarding of IP Packets
Delivery and Forwarding of IP Packets
 
Telnet ppt
Telnet pptTelnet ppt
Telnet ppt
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 

Viewers also liked

Introduction to SCTP and it's benefits over TCP and UDP
Introduction to SCTP and it's benefits over TCP and UDPIntroduction to SCTP and it's benefits over TCP and UDP
Introduction to SCTP and it's benefits over TCP and UDP
VIJAY SHARMA
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
Peter R. Egli
 
Telnet
TelnetTelnet
TELNET Protocol
TELNET ProtocolTELNET Protocol
TELNET Protocol
Peter R. Egli
 
Presentation on telnet
Presentation on telnetPresentation on telnet
Presentation on telnetAmandeep Kaur
 

Viewers also liked (6)

รายงาน Tcp
รายงาน Tcpรายงาน Tcp
รายงาน Tcp
 
Introduction to SCTP and it's benefits over TCP and UDP
Introduction to SCTP and it's benefits over TCP and UDPIntroduction to SCTP and it's benefits over TCP and UDP
Introduction to SCTP and it's benefits over TCP and UDP
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Telnet
TelnetTelnet
Telnet
 
TELNET Protocol
TELNET ProtocolTELNET Protocol
TELNET Protocol
 
Presentation on telnet
Presentation on telnetPresentation on telnet
Presentation on telnet
 

Similar to Ftp

File tranfer protocol
File tranfer protocolFile tranfer protocol
File tranfer protocol
KunalThorat9
 
Telnet and FTP.ppt
Telnet and FTP.pptTelnet and FTP.ppt
Telnet and FTP.ppt
ssuser1774d3
 
Computer network
Computer networkComputer network
Computer network
Pihu Goel
 
File Transfer Protocol (FTP)
File Transfer Protocol (FTP)File Transfer Protocol (FTP)
File Transfer Protocol (FTP)
AxelXrest
 
File transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationFile transfer protocol (ftp) in application
File transfer protocol (ftp) in application
RochakSrivastava3
 
OSI (Open System Interconnection) Model
OSI (Open System Interconnection) Model OSI (Open System Interconnection) Model
OSI (Open System Interconnection) Model
rachanabuch
 
Using an FTP client - Client server computing
Using an FTP client -  Client server computingUsing an FTP client -  Client server computing
Using an FTP client - Client server computing
lordmwesh
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressingAnitha Selvan
 
Web Dev Research
Web Dev ResearchWeb Dev Research
Web Dev Research
nathomas82
 
File transfer protocol- Gowdham
File transfer protocol- GowdhamFile transfer protocol- Gowdham
File transfer protocol- Gowdham
Gowdham P
 
An overview of ftp
An overview of ftpAn overview of ftp
An overview of ftp
indhuchezhian
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
DBU
 
ftp.07f.ppt
ftp.07f.pptftp.07f.ppt
ftp.07f.ppt
aozcan1
 

Similar to Ftp (20)

File tranfer protocol
File tranfer protocolFile tranfer protocol
File tranfer protocol
 
Ftp
FtpFtp
Ftp
 
Telnet and FTP.ppt
Telnet and FTP.pptTelnet and FTP.ppt
Telnet and FTP.ppt
 
Computer network
Computer networkComputer network
Computer network
 
File Transfer Protocol (FTP)
File Transfer Protocol (FTP)File Transfer Protocol (FTP)
File Transfer Protocol (FTP)
 
Avani
AvaniAvani
Avani
 
Ftp.75 to 76
Ftp.75 to 76Ftp.75 to 76
Ftp.75 to 76
 
Sem 1 Ch 11
Sem 1 Ch 11Sem 1 Ch 11
Sem 1 Ch 11
 
Ccna1v3 mod11
Ccna1v3 mod11Ccna1v3 mod11
Ccna1v3 mod11
 
File transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationFile transfer protocol (ftp) in application
File transfer protocol (ftp) in application
 
OSI (Open System Interconnection) Model
OSI (Open System Interconnection) Model OSI (Open System Interconnection) Model
OSI (Open System Interconnection) Model
 
Chapter3
Chapter3Chapter3
Chapter3
 
Using an FTP client - Client server computing
Using an FTP client -  Client server computingUsing an FTP client -  Client server computing
Using an FTP client - Client server computing
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressing
 
Presentation5
Presentation5Presentation5
Presentation5
 
Web Dev Research
Web Dev ResearchWeb Dev Research
Web Dev Research
 
File transfer protocol- Gowdham
File transfer protocol- GowdhamFile transfer protocol- Gowdham
File transfer protocol- Gowdham
 
An overview of ftp
An overview of ftpAn overview of ftp
An overview of ftp
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
ftp.07f.ppt
ftp.07f.pptftp.07f.ppt
ftp.07f.ppt
 

Recently uploaded

Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs  Consulting SMEs.pptxEmpowering Limpopo Entrepreneurs  Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
Precious Mvulane CA (SA),RA
 
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
mymwpc
 
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to TellWondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
Vic Auto Collision & Repair
 
5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention
5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention
5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention
Bertini's German Motors
 
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
eygkup
 
What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...
What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...
What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...
Autohaus Service and Sales
 
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out HereWhy Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Masters European & Gapanese Auto Repair
 
Core technology of Hyundai Motor Group's EV platform 'E-GMP'
Core technology of Hyundai Motor Group's EV platform 'E-GMP'Core technology of Hyundai Motor Group's EV platform 'E-GMP'
Core technology of Hyundai Motor Group's EV platform 'E-GMP'
Hyundai Motor Group
 
What Exactly Is The Common Rail Direct Injection System & How Does It Work
What Exactly Is The Common Rail Direct Injection System & How Does It WorkWhat Exactly Is The Common Rail Direct Injection System & How Does It Work
What Exactly Is The Common Rail Direct Injection System & How Does It Work
Motor Cars International
 
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptxStatistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
coc7987515756
 
What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?
Hyundai Motor Group
 
gtyccccccccccccccccccccccccccccccccccccccccccccccccccccccc
gtycccccccccccccccccccccccccccccccccccccccccccccccccccccccgtyccccccccccccccccccccccccccccccccccccccccccccccccccccccc
gtyccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4thzenzstar
 
Tyre Industrymarket overview with examples of CEAT
Tyre Industrymarket overview with examples of CEATTyre Industrymarket overview with examples of CEAT
Tyre Industrymarket overview with examples of CEAT
kshamashah95
 
Ec330B Lc Excavator Volvo Service Repair.pdf
Ec330B Lc Excavator Volvo Service Repair.pdfEc330B Lc Excavator Volvo Service Repair.pdf
Ec330B Lc Excavator Volvo Service Repair.pdf
Excavator
 
Why Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release CommandsWhy Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release Commands
Dart Auto
 
Ec460b lc Excavator Volvo Service Repair.pdf
Ec460b lc Excavator Volvo Service Repair.pdfEc460b lc Excavator Volvo Service Repair.pdf
Ec460b lc Excavator Volvo Service Repair.pdf
Excavator
 
Antique Plastic Traders Company Profile
Antique Plastic Traders Company ProfileAntique Plastic Traders Company Profile
Antique Plastic Traders Company Profile
Antique Plastic Traders
 
Things to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your carThings to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your car
jennifermiller8137
 
What Causes 'Trans Failsafe Prog' to Trigger in BMW X5
What Causes 'Trans Failsafe Prog' to Trigger in BMW X5What Causes 'Trans Failsafe Prog' to Trigger in BMW X5
What Causes 'Trans Failsafe Prog' to Trigger in BMW X5
European Service Center
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
daothibichhang1
 

Recently uploaded (20)

Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs  Consulting SMEs.pptxEmpowering Limpopo Entrepreneurs  Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
 
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
 
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to TellWondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
 
5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention
5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention
5 Warning Signs Your BMW's Intelligent Battery Sensor Needs Attention
 
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
 
What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...
What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...
What Does the PARKTRONIC Inoperative, See Owner's Manual Message Mean for You...
 
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out HereWhy Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
 
Core technology of Hyundai Motor Group's EV platform 'E-GMP'
Core technology of Hyundai Motor Group's EV platform 'E-GMP'Core technology of Hyundai Motor Group's EV platform 'E-GMP'
Core technology of Hyundai Motor Group's EV platform 'E-GMP'
 
What Exactly Is The Common Rail Direct Injection System & How Does It Work
What Exactly Is The Common Rail Direct Injection System & How Does It WorkWhat Exactly Is The Common Rail Direct Injection System & How Does It Work
What Exactly Is The Common Rail Direct Injection System & How Does It Work
 
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptxStatistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
 
What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?
 
gtyccccccccccccccccccccccccccccccccccccccccccccccccccccccc
gtycccccccccccccccccccccccccccccccccccccccccccccccccccccccgtyccccccccccccccccccccccccccccccccccccccccccccccccccccccc
gtyccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 
Tyre Industrymarket overview with examples of CEAT
Tyre Industrymarket overview with examples of CEATTyre Industrymarket overview with examples of CEAT
Tyre Industrymarket overview with examples of CEAT
 
Ec330B Lc Excavator Volvo Service Repair.pdf
Ec330B Lc Excavator Volvo Service Repair.pdfEc330B Lc Excavator Volvo Service Repair.pdf
Ec330B Lc Excavator Volvo Service Repair.pdf
 
Why Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release CommandsWhy Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release Commands
 
Ec460b lc Excavator Volvo Service Repair.pdf
Ec460b lc Excavator Volvo Service Repair.pdfEc460b lc Excavator Volvo Service Repair.pdf
Ec460b lc Excavator Volvo Service Repair.pdf
 
Antique Plastic Traders Company Profile
Antique Plastic Traders Company ProfileAntique Plastic Traders Company Profile
Antique Plastic Traders Company Profile
 
Things to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your carThings to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your car
 
What Causes 'Trans Failsafe Prog' to Trigger in BMW X5
What Causes 'Trans Failsafe Prog' to Trigger in BMW X5What Causes 'Trans Failsafe Prog' to Trigger in BMW X5
What Causes 'Trans Failsafe Prog' to Trigger in BMW X5
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
 

Ftp

  • 1. FTP File Transfer Protocol Reference: RFC 959
  • 2. FTP Objectives (from RFC 959) promote sharing of files encourage indirect use of remote computers shield user from variations in file storage transfer data reliably and efficiently “FTP, although usable directly by a user at a terminal, is designed mainly for use by programs”
  • 3. The FTP Model PI: Protocol Interpreter PI: Protocol Interpreter DTP: Data Transfer Protocol DTP: Data Transfer Protocol User Interface User Control Server PI User PI File Data File System Server DTP User DTP System
  • 4. Control and Data Connections Control functions (commands) and reply codes are transferred over the control connection. All data transfer takes place over the data connection. The control connection must be “up” while data transfer takes place.
  • 5. Control Connection The control connection is the “well known” service. The control connection uses the TELNET protocol. Commands and replies are all line oriented text (default is ASCII).
  • 6. Standard Connection Model Control A A Data B B
  • 7. Alternative Connection Model Control Control A B B Data C C
  • 8. Access ControlCommands USER specify user PASS specify password CWD change directory CDUP change directory to parent QUIT logout
  • 9. Transfer Parameter Commands PORT publish local data port PASV server should listen TYPE establish data representation MODE establish transfer mode STRU establish file structure
  • 10. Service Commands RETR retrieve file STOR send file STOU send file and save as unique APPE send file and append ABOR abort previous service command PWD print working directory LIST transfer list of files over data link
  • 11. FTP Replies All replies are sent over control connection. Replies are a single line containing – 3 digit status code (sent as 3 numeric chars). – text message. The FTP spec. includes support for multiline text replies. status code is used by programs, text is for humans.
  • 12. FTP Reply Status Code First digit of status code indicates type of reply: ‘1’: Positive Preliminary Reply (got it, but wait). ‘2’: Positive Completion Reply (success). ‘3’: Positive Intermediate Reply (waiting for more information). ‘4’: Transient Negative Completion (error - try again). ‘5’: Permanent Negative Reply (error - can’t do).
  • 13. FTP Reply Status Code 2nd digit indicates function groupings. ‘0’: Syntax (problem with command syntax). ‘1’: Information (reply to help or status cmds). ‘2’: Connections (problem with a connection). ‘3’: Authentication (problem with login). ‘4’: Unspecified. ‘5’: File system (related to file system). 3rd digit indicates specific problem within function group.
  • 14. Data Transfer Modes STREAM: file is transmitted as a stream of bytes. BLOCK: file is transmitted as a series of blocks preceded by headers containing count and descriptor code (EOF, EOR, restart marker). COMPRESSED: uses a simple compression scheme - compressed blocks are transmitted.
  • 15. RFC 959 - Please Read ! The RFC includes lots more information and many details including: – parameters for commands – lists of reply status codes – protocol state diagrams – support for a variety of file structures – sample sessions