Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - 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 
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 - Explaining the Exchange


    (Page 2 of 5 )

    I’m using telnet (acting as the FTP client in this case) to access the FTP server that I created. As you can see, the server sends a welcome message to the client before authentication. I then typed the command “user” and gave my dummy username “myusername.” The server responded by saying “user name okay, need password.” I then typed the command “pass” and entered my dummy password which is “mypassword.” The password was accepted and gave me access to the FTP server. You can see from this communication that the server uses different numbers depending on the message. Below are some of the codes as defined in RFC 959:

    200 Command okay.

    500 Syntax error, command unrecognized.

    This may include errors such as command line too long.

    501 Syntax error in parameters or arguments.

    202 Command not implemented, superfluous at this site.

    502 Command not implemented.

    503 Bad sequence of commands.

    504 Command not implemented for that parameter.

    230 User logged in, proceed.

    530 Not logged in.

    331 User name okay, need password.

    332 Need account for login.

    532 Need account for storing files.

    I haven't listed all the reply codes, but as you can see from the above, they are very easy to understand. For a fuller explanation of these codes, consult the RFC 959.

    We already stated that an FTP server makes files available to the FTP client. Well, that is one function of an FTP server. In addition to that, the FTP server also enables a user to manipulate these files. For example, you can download, move, delete, rename and upload files. You can also get information about a file such as its last modified date or its size. All of this is achieved through commands. For example, to look at all the files in a directory you will need to call the LIST command, or to get a file from the server you call the RETR command.

    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

    - 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...
    - Using the Client Dataset in Two-Tiered Clien...






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