SlideShare a Scribd company logo
By: Om Prakash
1
2
This stands for File Transfer Protocol. This is the
simplest and most popular way to exchange files
over the Internet or intranet.
3
 Transferring files from a client computer to a server computer
is called "uploading" and transferring from a server to a client
is "downloading".
To access an FTP server, users must be able to connect
to the Internet or an intranet (via a modem or local area
network) with an FTP client program.
FTP uses the services of TCP. It needs two TCP
connections. The well-known port 21 is used for the
control connection and the well-known port 20 for the
data connection
4
CONTROL CONNECTION:
The communication path between the USER-PI (Process
Interpreter) and SERVER-PI for the exchange of
commands and replies. This connection follows the Telnet
Protocol.
DATA CONNECTION:
A full duplex connection over which data is transferred, in
a specified mode and type. The data transferred may be a
part of a file, an entire file or a number of files. The path
may be between a server-DTP (Data Transfer Process) and
a user-DTP, or between two server-DTPs.
5
6
Client connect from a random unprivileged port (n > 1023) to the
servers command port (21) and sends port command to tell server to
connect to n+1 then listens on the next higher unprivileged port (n+1)
for server responses. The server connects from it’s data port (20) to the
client data port (n+1)
ClientServer
20 21 1026 1027
1
2
3
4
Types of connections
7
Client opens two random unprivileged ports ( n > 1023 and n+1; ex
1026 and 1027) and connects the first port (n) to server command port
21 and issues a PASV command (server sends port to use for data);
client connects to servers specified data port, server completes
connection.
ClientServer
20 21 1026 1027
1
2
2024
3
4
Internal client
Private FTP server
INTERNET
External client
Ways to connect to an FTP server
8
Private user-only site
Allows only system users (or users with FTP profile) to connect
via FTP and access their files.
Anonymous
Allows anyone on the network to connect to it and transfer files
without having an account.
9
FTP commands
ftp [host]
- open an ftp session with the specified Host machine.
open [host]
- Establish a connection to the specified host when you're already at
an ftp prompt.
user [username]
- Log into an ftp server when you're already connected in an ftp
session.
ls [remote-directory]
- Print a listing of the contents of remote-directory on the remote
machine. The listing includes any system-dependent information
that the server chooses to include.
10
help [command]
- Print an informative message about the meaning of command. If
no argument is given, ftp prints a list of the known commands.
ascii
- Set the file transfer type to ASCII . Only use this transfer method
for text-files.
binary
- Set the file transfer type to support binary file transfer. Use this
transfer method for anything other than a textfile.
11
cd [remote-directory]
- Change the working directory on the remote machine to remote-
directory.
lcd [directory]
- Change the working directory to directory on the local machine.
If no directory is specified, the user's home directory is used.
pwd
- Print the name of the current working directory on the remote
machine. Often times this includes printing the full path.
12
put [local-file]
- Put (upload) local-file to the remote machine. No
wildcards!
get [remote-file]
- Retrieve (download) remote-file and store it on the
local machine. No wildcards! Can only get one file at a
time.
mput [local-files]
- Expand wild cards in the list of local-files given as
arguments and do a put for each file in the resulting
list. The list of files should be separated by spaces.
13
mkdir [new-directory-name]
- create a directory new-directory-name on the
remote machine.
rmdir [directory-name]
- Delete the directory entitled directory-name on the
remote machine.
rename [old-file-name] [new-file-name]
- Rename the file old-file-name on the remote
machine, to the file new-file-name.
14
quote site chmod xxx [file name]
- Change the permission modes of the file file-name
on the remote system to xxx mode. Note that the
chmod command is not always implemented.
get [file-name] "|more"
- Instead of downloading and saving the file file-name
on the local machine, you view its contents. Only
recommended to use with text files.
bye
- Terminate the FTP session with the remote server
and exit ftp. On Unix, an end of file should also
terminate the session and exit.
15
16
Example…
Assume you are required to download the file
lan.txt
from
papa.cdrom.com/pub/games/
1. At the command prompt type :
ftp papa.cdrom.com (this will start the ftp and
connection to the site)
The system will respond with the message
>connected to sunsite.cnlab-switch.ch.
>220 warchive.cdrom.com.FTP server (Version wu-
2.4.2(18)
>Thu nov 26 09:30:12 MET 2001) ready.
>Name (carchive.cdrom.com:usr):
17
2. Type ftp
The system will respond with something
similar to.
>331 Guest login ok, send your
complete e-mail address as password
>Password: (type your email)
18
3. After the welcome message that may look
something like this.
230 guest login ok, access restrictions apply.
Remote system type is UNIX.
We must now change to the directory “/pub/games”
Type in cd pub (this will change to the directory
pub), in this directory we will find downloadable
material.
19
Lets type dir to see the list of files in there we should see
the directory games in the list.
drwxr-xr-x 6 731 730 512 Nov 4 05:11 games
The d in front of the listing tells me it is a directory.
If dir does not work we can use the command: ls-al
20
4. Use „cd‟ to change into the remaining
directories:
Type:
cd games
21
5. Use ‘dir’ to find the file:
Type:
dir l*
to get a listing of all files which start with ‘l’.
You should see:
-rw-rw-r– 1 2066 ftp-game 134868 Jun 30
2001 lan.txt
•Because there is no ‘d’ at the far left, you
know that it is a file, not a directory.
•The 134868 is the file size, it is 134,868
bytes (approx. 134 Kb). It was last
modified on the 30th of June 2001.
22
6. To download, type:
bin
• This will make your download in „binary‟ form
•This mode will always work for all files, whereas the
default mode „ascii‟ will only work for text files.
•Therefore always make sure you type „bin‟ before you
download or you may get garbage!
23
Type:
get lan.txt
And type „y‟ when asked to confirm.
• „lan‟ will now download, and will soon be on the
computer you ran „ftp‟ from.
• Alternately, if you want to download multiple files,
you could type: „mget *‟, this would download *all*
files in the directory; „mget l*‟ would download all files
beginning with „l‟.
• If you do not wish to confirm each download one by
one, type „prompt‟ to turn that off. If you wish to have a
download indicator, type „hash‟.
24
6b. To upload:
• To upload a file you must be in a directory you are
allowed to upload into.
• You would type „put lan.txt‟ if you wished to upload
„lan.txt‟ or „mput l*‟ to upload all files beginning with
„l‟ for example.
• Make sure that you type „bin‟ again before you upload
anything.
25
7. Logging off.
Type:
bye
to close the connection and quit FTP.
• If you have any questions type either „man ftp‟
26

More Related Content

What's hot

02 protocols and tcp-ip
02 protocols and tcp-ip02 protocols and tcp-ip
02 protocols and tcp-ip
kashish0313
 
File transfer protocol (ftp)
File transfer protocol (ftp)File transfer protocol (ftp)
File transfer protocol (ftp)
Cort1026
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
selvakumar_b1985
 
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
 
Smtp
SmtpSmtp
Smtp
Eri Alam
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
Vinh Nguyen
 
Networking issues for distributed systems
Networking issues for distributed systemsNetworking issues for distributed systems
Networking issues for distributed systems
kingGovindi
 
OSI Reference Model-Lecture-2.pptx
OSI Reference Model-Lecture-2.pptxOSI Reference Model-Lecture-2.pptx
OSI Reference Model-Lecture-2.pptx
vishal choudhary
 
Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol
Lina Guha Roy
 
FTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceFTP Client and Server | Computer Science
FTP Client and Server | Computer Science
Transweb Global Inc
 
Ftp server
Ftp serverFtp server
Ftp server
pawnbeeta
 
Osi layer and network protocol
Osi layer and network protocolOsi layer and network protocol
Osi layer and network protocol
Nayan Sarma
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocol
Milind Swane
 
Http
HttpHttp
MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)
NetProtocol Xpert
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
AbDul ThaYyal
 
Shttp
ShttpShttp
Transport Layer Numericals
Transport Layer NumericalsTransport Layer Numericals
Transport Layer Numericals
Manisha Keim
 
Application Layer and Protocols
Application Layer and ProtocolsApplication Layer and Protocols
Application Layer and Protocols
Rubal Sagwal
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
Shubham Srivastava
 

What's hot (20)

02 protocols and tcp-ip
02 protocols and tcp-ip02 protocols and tcp-ip
02 protocols and tcp-ip
 
File transfer protocol (ftp)
File transfer protocol (ftp)File transfer protocol (ftp)
File transfer protocol (ftp)
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
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
 
Smtp
SmtpSmtp
Smtp
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Networking issues for distributed systems
Networking issues for distributed systemsNetworking issues for distributed systems
Networking issues for distributed systems
 
OSI Reference Model-Lecture-2.pptx
OSI Reference Model-Lecture-2.pptxOSI Reference Model-Lecture-2.pptx
OSI Reference Model-Lecture-2.pptx
 
Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol
 
FTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceFTP Client and Server | Computer Science
FTP Client and Server | Computer Science
 
Ftp server
Ftp serverFtp server
Ftp server
 
Osi layer and network protocol
Osi layer and network protocolOsi layer and network protocol
Osi layer and network protocol
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocol
 
Http
HttpHttp
Http
 
MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Shttp
ShttpShttp
Shttp
 
Transport Layer Numericals
Transport Layer NumericalsTransport Layer Numericals
Transport Layer Numericals
 
Application Layer and Protocols
Application Layer and ProtocolsApplication Layer and Protocols
Application Layer and Protocols
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 

Similar to File Transfer Protocol

file transfer and access utilities
file transfer and access utilitiesfile transfer and access utilities
file transfer and access utilities
tumetr1
 
Rakesh Kaushik
Rakesh KaushikRakesh Kaushik
Rakesh Kaushik
itplant
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
Raghu nath
 
Ft pv2(1)
Ft pv2(1)Ft pv2(1)
FTP(In_Linux).pptx
FTP(In_Linux).pptxFTP(In_Linux).pptx
FTP(In_Linux).pptx
ShanmugapriyaSenthil3
 
Cita310chap09
Cita310chap09Cita310chap09
Cita310chap09
gofortution
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
csukxnr
 
六合彩 » SlideShare
六合彩 » SlideShare六合彩 » SlideShare
六合彩 » SlideShare
mvtqyygx
 
六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare
mmfirkhw
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
dqxjlhfc
 
六合彩-香港六合彩
六合彩-香港六合彩六合彩-香港六合彩
六合彩-香港六合彩
skpkcd
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
cxrcpdu
 
香港六合彩-六合彩
香港六合彩-六合彩香港六合彩-六合彩
香港六合彩-六合彩
qiohms
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
yqtvdsbl
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
roschahacker
 
Linux internet server security and configuration tutorial
Linux internet server security and configuration tutorialLinux internet server security and configuration tutorial
Linux internet server security and configuration tutorial
annik147
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questions
Teja Bheemanapally
 
Rhel3
Rhel3Rhel3
Lecture 7 -_ftp,_tftp,_telnet_and_ssh
Lecture 7 -_ftp,_tftp,_telnet_and_sshLecture 7 -_ftp,_tftp,_telnet_and_ssh
Lecture 7 -_ftp,_tftp,_telnet_and_ssh
Serious_SamSoul
 
Cracking CTFs - Sysbypass CTF Walkthrough
Cracking CTFs - Sysbypass CTF WalkthroughCracking CTFs - Sysbypass CTF Walkthrough
Cracking CTFs - Sysbypass CTF Walkthrough
n|u - The Open Security Community
 

Similar to File Transfer Protocol (20)

file transfer and access utilities
file transfer and access utilitiesfile transfer and access utilities
file transfer and access utilities
 
Rakesh Kaushik
Rakesh KaushikRakesh Kaushik
Rakesh Kaushik
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
Ft pv2(1)
Ft pv2(1)Ft pv2(1)
Ft pv2(1)
 
FTP(In_Linux).pptx
FTP(In_Linux).pptxFTP(In_Linux).pptx
FTP(In_Linux).pptx
 
Cita310chap09
Cita310chap09Cita310chap09
Cita310chap09
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
六合彩 » SlideShare
六合彩 » SlideShare六合彩 » SlideShare
六合彩 » SlideShare
 
六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
 
六合彩-香港六合彩
六合彩-香港六合彩六合彩-香港六合彩
六合彩-香港六合彩
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
 
香港六合彩-六合彩
香港六合彩-六合彩香港六合彩-六合彩
香港六合彩-六合彩
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 
Linux internet server security and configuration tutorial
Linux internet server security and configuration tutorialLinux internet server security and configuration tutorial
Linux internet server security and configuration tutorial
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questions
 
Rhel3
Rhel3Rhel3
Rhel3
 
Lecture 7 -_ftp,_tftp,_telnet_and_ssh
Lecture 7 -_ftp,_tftp,_telnet_and_sshLecture 7 -_ftp,_tftp,_telnet_and_ssh
Lecture 7 -_ftp,_tftp,_telnet_and_ssh
 
Cracking CTFs - Sysbypass CTF Walkthrough
Cracking CTFs - Sysbypass CTF WalkthroughCracking CTFs - Sysbypass CTF Walkthrough
Cracking CTFs - Sysbypass CTF Walkthrough
 

Recently uploaded

Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 

Recently uploaded (20)

Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 

File Transfer Protocol

  • 2. 2 This stands for File Transfer Protocol. This is the simplest and most popular way to exchange files over the Internet or intranet.
  • 3. 3  Transferring files from a client computer to a server computer is called "uploading" and transferring from a server to a client is "downloading". To access an FTP server, users must be able to connect to the Internet or an intranet (via a modem or local area network) with an FTP client program. FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection and the well-known port 20 for the data connection
  • 4. 4
  • 5. CONTROL CONNECTION: The communication path between the USER-PI (Process Interpreter) and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol. DATA CONNECTION: A full duplex connection over which data is transferred, in a specified mode and type. The data transferred may be a part of a file, an entire file or a number of files. The path may be between a server-DTP (Data Transfer Process) and a user-DTP, or between two server-DTPs. 5
  • 6. 6 Client connect from a random unprivileged port (n > 1023) to the servers command port (21) and sends port command to tell server to connect to n+1 then listens on the next higher unprivileged port (n+1) for server responses. The server connects from it’s data port (20) to the client data port (n+1) ClientServer 20 21 1026 1027 1 2 3 4 Types of connections
  • 7. 7 Client opens two random unprivileged ports ( n > 1023 and n+1; ex 1026 and 1027) and connects the first port (n) to server command port 21 and issues a PASV command (server sends port to use for data); client connects to servers specified data port, server completes connection. ClientServer 20 21 1026 1027 1 2 2024 3 4
  • 8. Internal client Private FTP server INTERNET External client Ways to connect to an FTP server 8
  • 9. Private user-only site Allows only system users (or users with FTP profile) to connect via FTP and access their files. Anonymous Allows anyone on the network to connect to it and transfer files without having an account. 9
  • 10. FTP commands ftp [host] - open an ftp session with the specified Host machine. open [host] - Establish a connection to the specified host when you're already at an ftp prompt. user [username] - Log into an ftp server when you're already connected in an ftp session. ls [remote-directory] - Print a listing of the contents of remote-directory on the remote machine. The listing includes any system-dependent information that the server chooses to include. 10
  • 11. help [command] - Print an informative message about the meaning of command. If no argument is given, ftp prints a list of the known commands. ascii - Set the file transfer type to ASCII . Only use this transfer method for text-files. binary - Set the file transfer type to support binary file transfer. Use this transfer method for anything other than a textfile. 11
  • 12. cd [remote-directory] - Change the working directory on the remote machine to remote- directory. lcd [directory] - Change the working directory to directory on the local machine. If no directory is specified, the user's home directory is used. pwd - Print the name of the current working directory on the remote machine. Often times this includes printing the full path. 12
  • 13. put [local-file] - Put (upload) local-file to the remote machine. No wildcards! get [remote-file] - Retrieve (download) remote-file and store it on the local machine. No wildcards! Can only get one file at a time. mput [local-files] - Expand wild cards in the list of local-files given as arguments and do a put for each file in the resulting list. The list of files should be separated by spaces. 13
  • 14. mkdir [new-directory-name] - create a directory new-directory-name on the remote machine. rmdir [directory-name] - Delete the directory entitled directory-name on the remote machine. rename [old-file-name] [new-file-name] - Rename the file old-file-name on the remote machine, to the file new-file-name. 14
  • 15. quote site chmod xxx [file name] - Change the permission modes of the file file-name on the remote system to xxx mode. Note that the chmod command is not always implemented. get [file-name] "|more" - Instead of downloading and saving the file file-name on the local machine, you view its contents. Only recommended to use with text files. bye - Terminate the FTP session with the remote server and exit ftp. On Unix, an end of file should also terminate the session and exit. 15
  • 16. 16 Example… Assume you are required to download the file lan.txt from papa.cdrom.com/pub/games/
  • 17. 1. At the command prompt type : ftp papa.cdrom.com (this will start the ftp and connection to the site) The system will respond with the message >connected to sunsite.cnlab-switch.ch. >220 warchive.cdrom.com.FTP server (Version wu- 2.4.2(18) >Thu nov 26 09:30:12 MET 2001) ready. >Name (carchive.cdrom.com:usr): 17
  • 18. 2. Type ftp The system will respond with something similar to. >331 Guest login ok, send your complete e-mail address as password >Password: (type your email) 18
  • 19. 3. After the welcome message that may look something like this. 230 guest login ok, access restrictions apply. Remote system type is UNIX. We must now change to the directory “/pub/games” Type in cd pub (this will change to the directory pub), in this directory we will find downloadable material. 19
  • 20. Lets type dir to see the list of files in there we should see the directory games in the list. drwxr-xr-x 6 731 730 512 Nov 4 05:11 games The d in front of the listing tells me it is a directory. If dir does not work we can use the command: ls-al 20
  • 21. 4. Use „cd‟ to change into the remaining directories: Type: cd games 21
  • 22. 5. Use ‘dir’ to find the file: Type: dir l* to get a listing of all files which start with ‘l’. You should see: -rw-rw-r– 1 2066 ftp-game 134868 Jun 30 2001 lan.txt •Because there is no ‘d’ at the far left, you know that it is a file, not a directory. •The 134868 is the file size, it is 134,868 bytes (approx. 134 Kb). It was last modified on the 30th of June 2001. 22
  • 23. 6. To download, type: bin • This will make your download in „binary‟ form •This mode will always work for all files, whereas the default mode „ascii‟ will only work for text files. •Therefore always make sure you type „bin‟ before you download or you may get garbage! 23
  • 24. Type: get lan.txt And type „y‟ when asked to confirm. • „lan‟ will now download, and will soon be on the computer you ran „ftp‟ from. • Alternately, if you want to download multiple files, you could type: „mget *‟, this would download *all* files in the directory; „mget l*‟ would download all files beginning with „l‟. • If you do not wish to confirm each download one by one, type „prompt‟ to turn that off. If you wish to have a download indicator, type „hash‟. 24
  • 25. 6b. To upload: • To upload a file you must be in a directory you are allowed to upload into. • You would type „put lan.txt‟ if you wished to upload „lan.txt‟ or „mput l*‟ to upload all files beginning with „l‟ for example. • Make sure that you type „bin‟ again before you upload anything. 25
  • 26. 7. Logging off. Type: bye to close the connection and quit FTP. • If you have any questions type either „man ftp‟ 26

Editor's Notes

  1. TFTP uses the services of UDP on the well-known port 69 TP uses the services of UDP on the well-known port 69
  2. Tftp is ftp like service available through UDP on well known port 69.
  3. Tftp is ftp like service available through UDP on well known port 69.