FTP File Transfer Protocol - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

FTP File Transfer Protocol

Description:

... be standalone or the client may be in a web browser), a protocol, and a server. ... As a result, a packet sniffers could potentially intercept user passwords which ... – PowerPoint PPT presentation

Number of Views:7115
Avg rating:5.0/5.0
Slides: 18
Provided by: informatio123
Category:

less

Transcript and Presenter's Notes

Title: FTP File Transfer Protocol


1
FTP File Transfer Protocol
  • FTP - File Transfer Protocol is one of the
    original Internet services. It was designed to
    move files from one computer to another
  • Today people use a variety of technologies to
    move files between machines including
  • email attachments, web browsers, LAN based file
    sharing, peer-to-peer file sharing, or
    proprietary file sharing clients
  • FTP is based on the client/server model where
    there is an FTP client (that may be standalone or
    the client may be in a web browser), a protocol,
    and a server.

2
How FTP Typically Works
  • The user runs an FTP client on their local
    machine
  • They tell their client to opens a session with an
    FTP server on a remote machine
  • The user logs onto the remote machine
  • The user lists the files at the remote machine
    and moves into the right directory on both the
    local and the remote machine
  • The user indicates if the file to transfer is
    binary or ascii, then puts files to the remote
    machine, or gets files from the remote machine
  • The user closes the session

3
FTP Clients
  • Historically the first clients were command
    based. i.e. on Unix or at a DOS command prompt
    type
  • ftp or ftp host.domain
  • Commands are Unix like (cd, mkdir to traverse the
    folder hierarchies, put and get to move
    files) and it can be difficult or confusing for a
    novice user

4
FTP Graphical Clients
  • Today we have GUI FTP clients to make it a little
    easier to use.
  • On Windows popular clients are WS-FTP or
    CuteFTP.
  • On Mac Fetch. Many more available, some
    commercial some free
  • FTP client functionality is also built into most
    Web browsers today. Enter an address like ftp//
    to get to an FTP site or often you can download
    using http
  • Since some firewalls may block FTP, http based
    downloads have yet another advantage for some
    users
  • Some applications let you save directly to an FTP
    site, i.e.. In Word you can do a File/Save As and
    enter and address like ftp//host.domain/filename
    to save on some remote FTP servers

5
FTP the big problem
  • Same as telnet the protocol sends data in clear
    text.
  • As a result, a packet sniffers could potentially
    intercept user passwords which makes standard FTP
    a security threat.
  • Many organizations (including CAC at UW) have
    disabled FTP as a result and use other file
    transfer technologies instead.
  • Since other technologies are available and a
    little easier to use FTP is not as popular as it
    once was. Many sites that make software
    available today for instance do it via a Web
    front end, not by making an FTP site available.
  • But FTP still widely used, especially for more
    specialized applications when you want to limit
    the download access to just certain people

6
Important Details.
  • Generally speaking when you do file transfers
    with most you want to be sure to specify if the
    file is ascii or binary
  • What if we have a text file and tell it to be
    sent in binary? Unfortunately text isnt exactly
    the same on all systems - Unix and PCs have
    different line endings. ltCRgt vs. ltCRgtltLFgt. So it
    is important to say you are sending text if that
    is what it is
  • Also remember that case counts on some operating
    systems and there can be complications if you
    have used punctuation and or spaces in file names

7
Command Mode FTP
  • WS-FTP and other GUIs like SSH FTP make the
    FTP process very simple. Unfortunately you dont
    always have access to a GUI - often all you may
    have is a command mode client.
  • This is the case when you use Unix and the Dante
    command prompt .
  • Also, Win95/98/XP include a basic command line
    FTP client when you setup TCP/IP on your PC, do a
    Start, Run, and type FTP to use it

8
FTP Command-Line Overview
  • Run FTP client (on Windows Start/Run, FTP) at FTP
    prompt type
  • help - to see list of commands available
  • open host.domain - to connect to the remote host
  • Username xxxxxx
  • Password
  • ls, cd, pwd - to manipulate the remote
    filesystem
  • lcd - manipulate local filesystem
  • binary or bin - to tell FTP you are transferring
    a binary file
  • hash - to tell FTP you want to see progress with
    hash marks ( signs are displayed as the file is
    copied)
  • get filename - to get a file from the remote
    computer
  • put filename - to put a file on the remote
    computer
  • ! To temporarily go to a command prompt, exit to
    come back

9
Step 1 Initiate the connection
  • Start your command mode FTP client
  • In Windows do
  • Start, Run, FTP
  • You will receive the FTPgt prompt
  • Type the command open machine name
  • e.g. open ischool.washington.edu
  • On Unix type ftp and again you will receive the
    FTPgt Prompt

10
Step 2 - Login
  • Login required for security, FTP will prompt for
    your userid and password
  • Can see then you can only FTP to and from sites
    where you are defined as a user
  • The exception is using something called
    anonymous FTP
  • So...login with either a userid or as anonymous
  • FTP will put you in a default directory on the
    remote machine
  • Use ls or ls l to see a list of files there

11
Step 3 Move to the right place
  • Use the cd command to change directories on the
    remote machine until you get to the right place
  • Example cd downloads
  • Use the lcd (local change directory) command to
    change to the right directory on your computer
  • Example lcd C\My Documents

12
How do you know where to go?
  • Often times you may be told by someone that the
    file you need is in a certain location
  • Other times you may be browsing the site and not
    even know what is available
  • If browsing you can look for several common file
    names to help you see what is there
  • index, index.txt, readme, LS -LR, are good
    possibilities
  • Also many sites have a pub directory which is
    where they store their public files. Try
    cd-ing to the pub directory and look for files
    like those above

13
Step 4 Indicate the file type
  • Is the file a binary file or is it a text file?
  • By default FTP assumes files are text files
  • If it is binary (a graphic, a sound, a Word
    document) you need to specify that
  • At the FTP prompt type
  • bin

14
Step 5 Initiate the transfer
  • Use one of
  • Put--- Move file from client to the server
  • Get--- Move file from server to client
  • Very important not to get confused and overwrite
    an existing file.
  • So are you the client or are you the server?
  • Where you running this FTP program from is key

Client Machine
Server Machine
15
FTP Commands for Moving Multiple Files
  • prompt ---gt turns off prompt on each file
  • mget ----gt Get all files in the directory
  • mput ----gt Put all files in the directory
  • These commands are limited
  • Do not handle subdirectories
  • For bundling up multiple directories into a
    single file, archiving tools are used first

16
Sample FTP Session
  • C\gtftp ftp.microsoft.com
  • Connected to ftp.microsoft.com.
  • 220 Microsoft FTP Service
  • User (ftp.microsoft.com(none)) anonymous
  • 331 Anonymous access allowed, send identity
    (e-mail name) as password.
  • Password
  • 230-This is FTP.Microsoft.Com.
  • 230 Anonymous user logged in.
  • ftpgt ls
  • The listing of files and folders appears, removed
    from this sample to save space, found a folder
    and file I wanted
  • ftpgt cd deskapps
  • 250 CWD command successful.
  • ftpgt bin
  • 200 Type set to I.
  • ftpgt lcd "D\My Documents"
  • Local directory now D\My Documents.
  • ftpgt get MSBGOLD.EXE
  • 200 PORT command successful.
  • 150 Opening BINARY mode data connection for
    MSBGOLD.EXE(1983683 bytes).

17
Command Mode FTP Conclusion
  • Depending on what environment you use, you may
    use it rarely or you may not have any option
  • Not really that hard, uses the same basic
    commands that we may already know from Unix with
    the addition of put and get
Write a Comment
User Comments (0)
About PowerShow.com