home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR21 / MFTPDSRV.ZIP / FTPD.TXT next >
Text File  |  1993-03-01  |  14KB  |  296 lines

  1. FTPD Service for Windows NT
  2. by Software Innovations Incorporated
  3.  
  4. This document describes release 0.01 of Software Innovations Incorporated's FTP service for Windows NT.  Release 0.01 is a working prototype and has a number of known bugs and problems, some of which are related to API problems.  Be sure to read this document carefully as the security of your system is an issue when using this version of FTPD.
  5.  
  6. Software Innovations Incorporated makes no warranty as to the fitness of this software for any use.
  7.  
  8. This software and documentation is Copyright 1993 Software Innovations Incorporated.
  9. Portions of the software are Copyright 1984-1988 Regents of the University of California.
  10.  
  11. You are free to use and redistribute the binaries to the software provided that this document along with the above copyright notices are included.  A $25 shareware fee is requested.  Payment of the registration fee will entitle you to a free copy of the full production software and documentation.  For a limited time, source code for this working prototype may be purchased for an additional $25.
  12.  
  13. Why order the source?  The source provides examples of:
  14.     A working NT service, service installer, deinstaller
  15.     Control panel applet
  16.     Registry use
  17.     Multi-threaded operations
  18.     Critical section code
  19.     Thread-local storage
  20.     LanManager calls
  21.     WinSock operations in a multi-threaded environment
  22.  
  23. Send shareware and source fees to:
  24.     Software Innovations Incorporated
  25.     P.O. Box 644
  26.     Ames, Iowa  50010
  27.  
  28. or call (515) 232-9127 or fax (515) 232-7382 with credit-card orders (MC & Visa).
  29. Fax orders are preferred.  Be sure to include the following on a single sheet (no cover please):
  30.  
  31.     The words : FTP/NT registration    or:  FTP/NT registration and source order
  32.     Your name as it appears on the card.
  33.     Type of card (MC or VISA)
  34.     Card Number
  35.     Expiration date
  36.     Shipping address
  37.     Your signature
  38.     The total amount authorized : $25 registration, $50 with source code, plus any tax or
  39.         express shipping (see below).
  40.  
  41. Iowa residents should include applicable sales tax.  All source orders will be shipped within 24 hours by first class mail or UPS ground.  Include an additional $5.00 for UPS 2nd Day or $9.00 for UPS next day.  Production-version upgrades will be shipped as they become available.
  42.     
  43. Questions may also be e-mailed to:
  44.     martin@iastate.edu    or    76137,3022 on CompuServe
  45.     bron@iastate.edu
  46. DO NOT EMAIL CREDIT CARD ORDERS
  47.  
  48. Features
  49.     Implemented as a true Windows NT service.
  50.     Multi-threaded operation
  51.     Full integration with NT facilities
  52.     Logging recorded in the event logger
  53.     Configuration stored in the registry - no external config files
  54.     Connection limits
  55.     Support for a welcome message and .message files
  56.  
  57. Manifest
  58.  
  59. Your release kit contains the following files:
  60.     ftpdserv.exe        The actual service program
  61.     ftpdmsgs.dll        Message file for the NT event logger
  62.     ftpdctl.cpl        The control panel applet
  63.     ftpd.wri            This document
  64.     ftpdinst.exe        An installer program
  65.     ftpddel.exe        A de-installer
  66.  
  67. Installation
  68. Be sure to read the known bugs and problems section BEFORE activating FTPD on your system.  This version of FTPD has a necessarily-weak security system.  SII plans to replace this in the first productional version.
  69.  
  70. In the productional release, an MSSETUP install script will be provided.  For now, the process is a manual one.
  71.  
  72. To install the ftpd server:
  73.     1.    Log in as Administrator
  74.         Make sure that neither the control panel, service manager, or event logger are
  75.         running on your desktop (close their windows).
  76.  
  77.     2.    Unzip the files in a temporary directory.  The unzip program can be acquired from
  78.         ftp.iastate.edu pub/nt/(processor)/unzip.exe
  79.             unzip ftpdserv.zip
  80.  
  81.     3.     Execute the following commands:
  82.             copy ftpdserv.exe \winnt\system
  83.             copy ftpdmsgs.dll \winnt\system
  84.             copy ftpdctl.cpl \winnt\system
  85.  
  86.     4.    Run the installer program:
  87.             ftpdinst
  88.         This program will initialize values in the registry with defaults, register ftpd with
  89.         the event logger, and register the service program with the service manager.
  90.  
  91. To delete the service:
  92.     1.    Run the de-installer:
  93.             ftpdel
  94.         This program will un-register the service with the service manager. 
  95.         Registry values remain.
  96.  
  97.     2.    You may delete the files:
  98.             \winnt\system\ftpdserv.exe
  99.             \winnt\system\ftpdctl.cpl
  100.  
  101.     3.    You may also delete the file \winnt\system\ftpdmsgs.dll after clearing the
  102.         event logger application log of any FTPD messages.
  103.  
  104.  
  105. Configuration
  106.  
  107. The FTPD service is configured using a control-panel applet.  Double click on the FTPD icon to set the following values.  Configuration changes affect only future connections.  Existing ftpd client-server connections will continue using the settings in effect when they where initiated.
  108.  
  109. Log Connections        Check this box if you wish to log all new connections and logins
  110.                 to the event logger.
  111.  
  112. Log Transfers            Check this box to log all files stored or retrieved
  113.  
  114. Maximum number of         Enter the maximum number of simultaneous ftp client-server
  115. simultaneous connections    sessions that you wish to support at one time.  This can be used
  116.                 to limit the load which FTPD places on your system during busy
  117.                 periods.  If you don't want to limit the number of connections,
  118.                 set this value to 0.
  119.  
  120. Default session timeout    This sets the default idle timeout.  Any session which is idle (no
  121.                 commands issued for this number of seconds) will be
  122.                 disconnected.
  123.  
  124. Maximum session timeout    This sets the maximum idle timeout that a client may request.
  125.                 A client may request a longer timeout value.  This field
  126.                 represents the maximum allowable timeout value that may
  127.                 be requested.
  128.  
  129. Path to 'welcome' message    When a new connection is established, the text file indicated
  130.                 by this path will be displayed prior to the prompt for a login
  131.                 name and password.  (disabled - see known bugs section)
  132.                 This option has temporarily been replaced by the
  133.                 security-path kludge, below.
  134.  
  135. Share to use for access control
  136.                 The share name used here (e.g., \\skyhawk\ftp) will be used
  137.                 to check usernames and passwords.  If this field is left empty,
  138.                 then all that is required is a home directory for successful
  139.                 login. If this is set to a server and share name, then anyone
  140.                 with a correct name and password for and access to that
  141.                 share will be allowed to login to the ftpd service.
  142.                 This security kludge is in place until other appropriate
  143.                 measures can be coded (see: know bugs)
  144.  
  145.  
  146. Whenever a client sets the current working directory using the cd command, the service checks for the existance of a file named '.message'.  If a .message file is found, it will be sent to the client each time s/he enters that directory.  This is useful for presenting a brief descriptive message, disclaimer, or copyright notice for items in that directory.  These messages should be kept as short as possible as they are displayed each time the client enters that directory.
  147.  
  148. Operation
  149.  
  150. When serving out files via FTPD, please take care to respect all copyright, license, and shareware terms and conditions on the files you are making accessible.
  151.  
  152. Starting the FTPD Service
  153.        o    Open the control panel (in the group: Main).
  154.        o    Double-click the Services icon
  155.        o    Insure that the following services are started.  You may wish to use the Configuration
  156.     button to make them `automatic' such that they start each time the system is booted.
  157.         LanmanWorkstation
  158.         LanManServer (may not be require in future releases)
  159.         TCP/IP
  160.        o    Select the FTPD service and click on `Start'
  161.     If you wish FTPD to be started each time your system boots, click on Configure and
  162.     make FTPD `automatic'.
  163.     
  164. Stopping the FTPD Service
  165.        o    Open the control panel and double click on the Services icon.
  166.        o    Select FTPD from the list of services
  167.        o    Click on `Stop' and confirm your selection by clicking on Yes in the confirmation dialog
  168.        o    You may change FTPD to `manual' startup (such that it won't start automatically at each
  169.     reboot) by clicking on Configure and then selecting Manual.
  170.  
  171. Viewing the Activity Log
  172.         o    Open the Event Logger (available to the administrator in the Administrative Tools group.
  173.         o    Select Application from the Log menu to see FTPD event.
  174.         o    As FTPD runs, you may press F5 to refresh the event logger's display.
  175. See the Messages section of this document for a list of the possible log messages.
  176.  
  177. Client Operations
  178. All normal FTPD server operations are supported.  Because FTP was created for and exists primarily in the UNIX domains, some concessions to NT are required.  Those include:
  179.  
  180. Directory delimiters.  The following are all valid directory specifications:
  181.     cd d:\xxx\yyy
  182.     cd \\skyhawk\projects\ftp
  183.     cd /foo/bar
  184.     cd f:/foo/bar
  185.  
  186. Directory listings:
  187.     The client command `ls' will print a simple list of filenames.
  188.     The client command `dir' will print a more complete list of filenames and information:
  189.  
  190.     ftp> dir                                                         
  191.     200 PORT command successful.                                     
  192.     150 Opening ASCII mode data connection for file list.            
  193.     d    Administrators  11-Feb-1993  3:02p            bash          
  194.     d    Administrators   8-Feb-1993  5:16p            bison         
  195.     d    Administrators   2-Feb-1993  3:00p            compress      
  196.          Administrators  29-Apr-1991  4:57p       4245 CRON.C        
  197.     d    Administrators  17-Feb-1993  4:19p            dialit        
  198.     d    Administrators  11-Feb-1993 12:49p            diff          
  199.         :
  200.         :
  201.     d    Administrators  16-Feb-1993  9:55p            tcsh-6.03     
  202.     d    Administrators   2-Feb-1993 12:27p            unzip         
  203.     d    Administrators   1-Feb-1993  5:39p            UUCP          
  204.     d    Administrators   1-Feb-1993  5:38p            WINNEWS       
  205.     d    Administrators   1-Feb-1993  3:26p            zip           
  206.     226 Transfer complete.                                           
  207.     1725 bytes received in 2.32 seconds (0.74 Kbytes/sec)            
  208.  
  209.     The first column may contain one or more of:
  210.         d    This is a directory
  211.         R    a read-only file
  212.         S    a system file
  213.         T    a temporary file
  214.     Column 2 contains the name of the owner.
  215.     Column 3 contains the date last written
  216.     Column 4 contains the time last written
  217.     Column 5 (blank for directories) contains the size of the file
  218.     Column 6 contains the name of the item
  219.  
  220. Messages
  221.  
  222. The following message are currently supported.  Some will not appear unless the proper logging options are selected in the control panel applet.
  223.  
  224. The FTP service has started successfully.
  225. The FTP service has shut down successfully.
  226. A new connection has been received from %1.  This connection is being serviced by thread %2.
  227. FTP login by %2 at %1
  228. Anonymous FTP login from %1, %2
  229. User %1 timed out after %2 seconds.
  230. User %1 logged out from FTP.
  231. User %1 has stored file %2.
  232. User %1 has retrieved file %2.
  233. Repeated login failures from %1.
  234. Unable to create communication management thread.
  235. The TCP/IP library reports it is not ready for use.
  236. The requested WinSock API version is not available.
  237. The specified WinSock version is not supported by this DLL.
  238. CreateThread failed while trying to service a new connection.
  239. getpeername() failed on new connection
  240. getsockname() failed on new connection
  241. Unable to allocate thread local storage index.
  242. Unable to malloc thread local storage space.
  243.  
  244. Known Bugs and Problems
  245.  
  246.     Description : Deprecated security.  No real effective checking of the cleartext
  247.     username and password is done.  One or more needed security API calls are
  248.     currently inaccessible at this level of NT.
  249.     Fix : Add additional API calls, as they become available, to obtain a thread-local
  250.     access token in order to validate ftpd login and to use in controlling file access.
  251.     This fix is a must before this program can be considered a well-behaved productional
  252.     facility.  This fix is being actively pursued with MicroSoft.
  253.     Workaround : The service currently allows you to enter a server and share name into
  254.     the control panel applet.  All attempted logins will be checked for access to that share.
  255.     While this may sound like a reasonable compromise, because the ftp service runs as 
  256.     administrator, once logged in, no file or directory security is available.
  257.     
  258.     Further, the authors' experience with the WNetAddConnection2() has shown this
  259.     to be an iffy proposition.  That is, sometimes the call behaves as expected, other
  260.     times it doesn't.  While this may be the result of programmer error, the situation does
  261.     seem to improve if you use the NET USE command to mount the share at least once.
  262.  
  263.     If you can't get this surrogate method of security to work, just use an empty share name
  264.     in the control applet and anyone with a valid and accessible home directory will be 
  265.     allowed access to ftp.
  266.       
  267.     Description : The `welcome message' feature is disabled due to protocol 
  268.     incompatibilities with some ftp clients.
  269.     Fix : This feature will be re-enabled as the protocol for such messages becomes
  270.     clearer.
  271.  
  272.     Description : The .message file in a login (home) directory is not displayed.
  273.     Fix : Coding changes to ftpdserv to display this initial .message file.
  274.     Workaround : A command of CD . will display the .message file.
  275.  
  276.     Description : The control-panel applet icon is temporary.
  277.     Fix : The author, not being an icon artist, welcomes suggestions and submissions.
  278.  
  279.     Description : File sizes in the dir command only display the low 32 bits of the file size.
  280.  
  281.     Description : Some paths supplied with the dir command result in invalid or empty
  282.     responses while a cd to that same path and the an ls or dir without arguments
  283.     displays the correct response.
  284.  
  285.     Description : The stat-file command is not implemented.  Under UNIX it displays
  286.     the result of ls -algA.
  287.     Fix : This will be implemented in the next release in a format as close to UNIX as 
  288.     possible.
  289.  
  290.     Description : The service sometimes reports that the connection limit has been
  291.     reached when it in fact has not.
  292.     Workaround : Set the connection limit to 0 if this occurs on your system.
  293.  
  294.  
  295.  
  296.