Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 4 - 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  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
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 / 3
    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 - Access Control Commands


    (Page 4 of 5 )

    The FTP commands are divided into sections, one of which is called access control commands. These commands include:

    USER <SP> <username> <CRLF>

    PASS <SP> <password> <CRLF>

    ACCT <SP> <account-information> <CRLF>

    CWD <SP> <pathname> <CRLF>

    CDUP <CRLF>

    SMNT <SP> <pathname> <CRLF>

    QUIT <CRLF>

    These commands are important because they allow you to access, manipulate and control a file system. But for the purposes of the application that we will create in the next article, we only need to explain the USER, PASS and QUIT commands.

    The USER command is used to identify the user that wants to access a file system. It has the following syntax:

    USER Ausername

    This command will normally be the first command transmitted by the user after the control connections are made.

    The PASS command takes the user's password, which should be entered immediately after the user command has been entered. It has the following syntax:

    PASS Apassword

    These authentication methods are required by some servers. Others will allow anonymous access and a few others will not need any kind of authentication. Needless to say, it is always best to have some kind of authentication, for security reasons. How you implement these commands is completely up to you as the protocol does not specify any method for doing this. A good way would be to hold the user names and passwords in a database and verify them when a user logs in.

    The QUIT command terminates or logs out the user and closes the control connection if no file transfer is in progress. If there is a file transfer in progress when the user tries to log out (QUIT), the protocol describes what happens:

    "If file transfer is in progress, the connection will remain open for result response and the server will then close it. If the user-process is transferring files for several USERs but does not wish to close and then reopen connections for each, then the REIN command should be used instead of QUIT. An unexpected close on the control connection will cause the server to take the effective action of an abort (ABOR) and a logout (QUIT)."

    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

    - 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...
    - Using the Client Dataset in Two-Tiered Clien...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...
    - Using Try and Finally to Help Prevent Memory...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway