Delphi-Kylix
  Home arrow Delphi-Kylix arrow FTP Server: The Theory
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

FTP Server: The Theory
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 6
    2007-01-29

    Table of Contents:
  • FTP Server: The Theory
  • Explaining the Exchange
  • FTP Commands
  • Access Control Commands
  • Commands That Manipulate

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    FTP Server: The Theory


    (Page 1 of 5 )

    In this two part series about FTP we are going to look at what an FTP server is and what it is used for. The first part will cover the theory and the second part will put all the theory into practice; it's where we will actually implement an FTP server. I'm doing the theory first to give you a bit of background about the FTP protocol. This will make it easy for you to understand the purpose of each command in the protocol as well as how to implement them in the next article.

    What you will need

    Delphi 7 and higher, Indy10.1.15 or higher and lots and lots of enthusiasm.

    What is an FTP Server?

    An FTP server handles the process of transferring files from one computer to another.  The FTP protocol defines how FTP programs should work together when sharing files. It uses the client/server model in its implementation. This means that in order to use an FTP server, you will need an FTP client. In most cases the FTP server program offers files to the client program, but it also makes provision for the client to upload files.

    As with all protocols that uses the client server model, the process of sending and receiving files is done through the request/response method and involves commands. The client usually makes the request and the server responds. In order for a client to connect to a server, the FTP server application needs to be active and listening on a port. An FTP server usually runs on port number 21.

    When an FTP client connects to an FTP server it uses a username and password to help make the process secure. There is also an option to enable anonymous access to an FTP server, where an FTP client does not need a valid username or password. The communication between the FTP client and the FTP server is in plain text and uses reply codes as defined by the FTP protocol.  Here’s an example communication between an FTP client and FTP server:

    Server: 220 Welcome to my Indy FTP Server ready.

    Client: user myusername

    Server: 331 User name okay, need password.

    Client: pass mypassword

    Server: 230 User logged in, proceed.

    Client: Help

    Server: 500 'Help': command not understood.

    Client: Help

    214-The following commands are recognized (* => unimplemented, + => extension).

    214-    ABOR      EPSV      MLSD      NOOP      RETR      STOR      XPWD

    214-    ACCT*     FEAT      MLST      OPTS      RMD       STOU

    214-    ALLO      HELP      MODE      PASS      RNFR      STRU

    214-    APPE      LIST      MRCP*     PASV      RNTO      SYST

    214-    CDUP      MAIL*     MRSQ*     PORT      SITE      TYPE

    214-    CLNT      MDTM      MSAM*     PWD       SIZE      USER

    214-    CWD       MFCT      MSND*     QUIT      SMNT      XCUP

    214-    DELE      MKD       MSOM*     REIN      SPSV      XCWD

    214-    EPRT      MLFL*     NLST      REST      STAT      XMKD

    214

    More Delphi-Kylix Articles
    More By Leidago


       · This article just describes what a FTP server is and how it works. Any comments are...
       · Hi,The notes on FTP Server was very useful. I want to know more detail about the...
     

    DELPHI-KYLIX ARTICLES

    - Loading an XML Document into the DOM
    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT