File Transfer Protocol (FTP) - A Comprehensive Guide - Prof. Zongming Fei, Study notes of Computer Science

An overview of file transfer protocol (ftp), a standard protocol used for transferring files between different systems. Ftp supports the transfer of arbitrary files, accommodates different file types, and converts between heterogeneous systems. Ftp interfaces, commands, two-way file transfer, file name translation, file types and transfer modes, and ftp messages.

Typology: Study notes

Pre 2010

Uploaded on 10/01/2009

koofers-user-ivw
koofers-user-ivw 🇺🇸

9 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
FTP (RFC 959)
Generalized file transfer
Allow transfer of arbitrary files
Accommodate different file types
Convert between heterogeneous systems
Data types
Word lengths
Rules for file names
User login
File transfer Protocol (FTP)
TCP/IP standard is File Transfer Protocol (FTP)
General purpose protocol
Operating system and hardware independent
Transfers arbitrary files
Accommodates file ownership and access restrictions
Predates TCP/IP; adapted to TCP/IP later
Interface
Protocol actions include:
List contents of directory
Change to a different working directory
Retrieve a file
Put a file
ftp client commands
Two-step process:
Launch ftp
Connect to remote host
Connect involves using user account on remote host
Some FTP servers provide anonymous FTP
ftp client interface from BSD UNIX is de facto
standard
Many commands archaic and no longer used: tenex,
carriage control
Most often used: cd, dir, ls, get, put
Other useful: cr, pwd, lcd
Two-way file transfer
get: from FTP server to local host
put: to FTP server from local host
Default uses same name on both hosts; ftp client
allows specification of different names
mget, mput transfer multiple files
UNIX-like wildcard expansion
File name translation
File name syntaxes may be incompatible
UNIX - 128 character, mixed case; DOS - 8+3
character, upper case
Some names may not be legal in all systems
BSD ftp allows rules for filename translation
pf2

Partial preview of the text

Download File Transfer Protocol (FTP) - A Comprehensive Guide - Prof. Zongming Fei and more Study notes Computer Science in PDF only on Docsity!

FTP (RFC 959)

  • Generalized file transfer
    • Allow transfer of arbitrary files
    • Accommodate different file types
    • Convert between heterogeneous systems
      • Data types
      • Word lengths
      • Rules for file names
    • User login

File transfer Protocol (FTP)

  • TCP/IP standard is File Transfer Protocol (FTP)
  • General purpose protocol
    • Operating system and hardware independent
    • Transfers arbitrary files
    • Accommodates file ownership and access restrictions
  • Predates TCP/IP; adapted to TCP/IP later

Interface

  • Protocol actions include:
    • List contents of directory
    • Change to a different working directory
    • Retrieve a file
    • Put a file

ftp client commands

  • Two-step process:
    • Launch ftp
    • Connect to remote host
      • Connect involves using user account on remote host
      • Some FTP servers provide anonymous FTP
  • ftp client interface from BSD UNIX is de facto standard - Many commands archaic and no longer used: tenex, carriage control - Most often used: cd, dir, ls, get, put - Other useful: cr, pwd, lcd

Two-way file transfer

  • get: from FTP server to local host
  • put: to FTP server from local host
  • Default uses same name on both hosts; ftp client allows specification of different names
  • mget, mput transfer multiple files
    • UNIX-like wildcard expansion

File name translation

  • File name syntaxes may be incompatible
  • UNIX - 128 character, mixed case; DOS - 8+ character, upper case
  • Some names may not be legal in all systems
  • BSD ftp allows rules for filename translation

File types and transfer modes

  • Many different styles of file typing
    • UNIX - untyped; may hold anything
    • MacOS - strongly typed
  • ftp does two types of transfer:
    • Text - with appropriate translations to maintain integrity
    • Binary - no translation whatsoever

FTP messages

  • FTP messages from clients to servers are in the form of command - RETR filename - STOR filename - USER username - PORT n1,n2,n3,n4,n5,n
  • Each message from server includes a three-digit decimal number - 226 Transfer complete - 221 Goodbye
  • Convenient for computer and human recognition
  • Verbose mode shows messages; quiet mode suppresses messages

FTP client-server model

  • Remote server accepts control connection from local client
    • Client sends commands to server
    • Persists through entire session
  • Server creates data connection for data transfer
    • One data connection for each transferred file
    • Data transferred (either way)
  • Port numbers at the server
    • Control: 21
    • Data: 20
  • Port numbers at the client
    • If there is a PORT command, connect to the port number specified; otherwise use the same port number for the control connection

FTP client-server model

Using separate data connections

  • Separates commands from data
  • Client can send commands during data transfer
  • Closed connection indicates end of file

TFTP

  • Trivial File Transfer Protocol (TFTP) - much simpler than FTP - Based on UDP - File transfer only; no directory listing - No authorization
  • Can be used in UDP-only system
  • Requires less code than FTP
  • Often used for bootstrap; e.g., ROM-based diskless system