home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ftpser07.zip / ftpserver.INF (.txt) < prev    next >
OS/2 Help File  |  1998-08-11  |  47KB  |  1,294 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. FtpServer is an ftp daemon for OS/2.  It is distributed as optional shareware. 
  5. This documentation is for version 0.70. 
  6.  
  7. Disclaimer of Warranty 
  8.  
  9.       This Product is provided "as-is", without warranty of any kind, either 
  10.       expressed or implied, including, but not limited to, the implied 
  11.       warranties of merchantability and fitness for a particular purpose.  The 
  12.       entire risk as to the quality and performance of the Product is with you. 
  13.       Should the Product prove defective, the full cost of repair, servicing, 
  14.       or correction lies with you. 
  15.  
  16.  The author of FtpServer is Peter Moylan, peter@ee.newcastle.edu.au. 
  17.  
  18.  The latest version of FtpServer is normally kept at 
  19.  ftp://eepjm.newcastle.edu.au/software 
  20.  Information about other software on this site may be found at 
  21.  http://eepjm.newcastle.edu.au/html/software 
  22.  
  23.  I keep a mailing list of people who receive e-mail notification of new 
  24.  versions of my software.  If you want to be put on this list, let me know by 
  25.  e-mail to peter@ee.newcastle.edu.au. The mailing list is not used for any 
  26.  other purposes, and the addresses will not be passed on to anyone else. 
  27.  
  28.  
  29. ΓòÉΓòÉΓòÉ 2. Registration ΓòÉΓòÉΓòÉ
  30.  
  31.  Registration 
  32.  
  33. This software is "optional shareware".  What this means is that you decide 
  34. whether you want to register as a paid owner of the software. The software is 
  35. not crippled in any way, and I will continue to provide support and free 
  36. releases of new versions to all users, whether or not they are registered, for 
  37. at least the short-term future. 
  38.  
  39. If you decide that this software is worth supporting, you have the following 
  40. payment options. 
  41.  
  42. Payment through BMT Micro 
  43.  
  44. This is likely to be the most convenient method for most people, because BMT 
  45. Micro has a number of different payment methods, including credit cards.  It 
  46. also has agents in several countries.  For full details, see the BMTMicro 
  47. folder included in the FtpServer distribution. (This includes a program that 
  48. simplifies registration by e-mail, if you want to do it that way.) 
  49.  
  50. From Europe 
  51.  
  52. This works best for people living in the European Union.  (Warning: check first 
  53. whether your bank is going to charge you transfer fees. They shouldn't, but 
  54. I've heard of exceptions.)  You have two options: 
  55.  
  56.      Transfer 750 Belgian francs to the following bank account 
  57.  
  58.            Marion Gevers 
  59.            Account number 210-0384103-35 
  60.            G╨Æn╨Ærale de Banque (Belgium) 
  61.            Mention: FtpServer 
  62.  
  63.       and send an e-mail to peter@ee.newcastle.edu.au to confirm that you've 
  64.       done it. 
  65.  
  66.      Send a Eurocheque for 750 Belgian francs to 
  67.  
  68.            Peter Moylan 
  69.            91 Harriet Street 
  70.            Waratah, NSW 2298 
  71.            Australia 
  72.  
  73.  Payment directly to me in Australia 
  74.  
  75.  This is a more attractive option for people in Australia.  From other 
  76.  countries, it's not a good idea because of the bank charges on international 
  77.  transfers.  (Please don't send non-Australian currency to an Australian bank, 
  78.  because then I get hit with exorbitant bank fees.) You can do it in either of 
  79.  two ways. 
  80.  
  81.      Send a cheque, or equivalent, for $25 (Australian dollars) to 
  82.  
  83.            Peter Moylan 
  84.            91 Harriet Street 
  85.            Waratah, NSW 2298 
  86.            Australia 
  87.  
  88.      Transfer the amount of $25 (Australian dollars) to the following bank 
  89.       account. 
  90.  
  91.            Marion Gevers 
  92.            Account number (06 2831) 00626468 
  93.            Commonwealth Bank 
  94.            University of Newcastle, Australia 
  95.  
  96.  
  97. ΓòÉΓòÉΓòÉ 3. Documentation in other languages ΓòÉΓòÉΓòÉ
  98.  
  99. Documentation in other languages 
  100.  
  101. To simplify the distribution, the FtpServer zip file normally contains only 
  102. English-language documentation.  To get documentation in another language, go 
  103. to ftp://eepjm.newcastle.edu.au/inf and look for a file called 
  104. ftpserver.inf.xxx, where xxx indicates the language. 
  105.  
  106. At present, the only languages available are English and Russian.  (The Russian 
  107. version is ftpserver.inf.866.)  If you want to volunteer to do another 
  108. translation, you will find the original document source (FtpServer.IPF) in 
  109. source.zip, which is included as part of the FtpServer distribution. 
  110.  
  111. The copyright on the translations belongs to the people who did the 
  112. translations.  The Russian translation belongs to Konstantin Boyandin. 
  113.  
  114.  
  115. ΓòÉΓòÉΓòÉ 4. Server features ΓòÉΓòÉΓòÉ
  116.  
  117.  FtpServer is an ftp server program that implements most of the ftp standard, 
  118. RFC 959.  It supports re-get and passive mode transfers.  The system manager 
  119. can control which directories are visible to users, and the kind of access 
  120. (read, write, delete) allowed in each directory. 
  121.  
  122. For further details, see 
  123.  
  124.      What's special about FtpServer 
  125.      Limitations and missing features 
  126.      Quirks 
  127.      Troublesome clients 
  128.      Nonstandard features 
  129.  
  130.  
  131. ΓòÉΓòÉΓòÉ 4.1. What's special about FtpServer? ΓòÉΓòÉΓòÉ
  132.  
  133.      Supports most of what's in the FTP standard, including re-get and passive 
  134.       mode. 
  135.  
  136.      Fast and compact. 
  137.  
  138.      Compatible with all FTP clients that I've been able to test. 
  139.  
  140.      Separate read, write, and delete permission for each directory the user 
  141.       can see.  You can also make directories invisible. Users can be given 
  142.       multiple home directories, if desired. 
  143.  
  144.      You can restrict the IP addresses from which clients can log in, and you 
  145.       can restrict the number of simultaneous logins from the same address. 
  146.  
  147.      Can be run from inetd. 
  148.  
  149.      Can be run detached. 
  150.  
  151.  
  152. ΓòÉΓòÉΓòÉ 4.2. Limitations and missing features ΓòÉΓòÉΓòÉ
  153.  
  154. LIMITATIONS AND MISSING FEATURES 
  155.  
  156. These are things I might fix up when I have the time, though some have higher 
  157. priority than others. 
  158.  
  159.      Transfer types: only Ascii, Image, and "Local 8" are supported. Support 
  160.       for Fortran carriage control and EBCDIC will probably never be added. 
  161.  
  162.      Page-structured files will probably never be supported. (As far as I 
  163.       know, only PDP-10 systems support this feature.) 
  164.  
  165.      The only supported transmission mode is stream mode.  I might or might 
  166.       not add support for block mode and compressed mode at a later stage.  For 
  167.       the moment, there doesn't seem to be any demand for these extras - I 
  168.       haven't come across any ftp client that uses them. 
  169.  
  170.  The only command from RFC 959 that is not implemented is STAT. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 4.3. Quirks ΓòÉΓòÉΓòÉ
  174.  
  175. QUIRKS 
  176.  
  177. These might be seen as errors, but there's no need to fix them because they 
  178. don't have a harmful effect. 
  179.  
  180.      Can CD to a directory that doesn't exist, if that directory is shown as 
  181.       visible in the user's permission file.  Not a real problem, because the 
  182.       user sees an empty listing and can't do any operations in that directory. 
  183.  
  184.  
  185. ΓòÉΓòÉΓòÉ 4.4. Troublesome clients ΓòÉΓòÉΓòÉ
  186.  
  187. TROUBLESOME CLIENTS 
  188.  
  189. Different ftp clients work differently, and some of them don't bother to adhere 
  190. to the standards, so there will probably always be some client 
  191. incompatibilities.  The ones I know about so far are: 
  192.  
  193.    1. One of the MS-Windows ftp clients (for the moment I've forgotten which 
  194.       one) gives unreasonable time delays when listing a short directory, 
  195.       although long listings are quite fast.  The tests I've been able to do 
  196.       suggest that this problem occurs only when the client and server machines 
  197.       are physically close to each other.  Once the network delays rise to more 
  198.       typical values, the problem goes away. 
  199.  
  200.    2. I've been told of a problem when using ws-ftp, involving a "can't change 
  201.       directory" symptom when fetching the entire contents of a directory; but 
  202.       I've been unable to reproduce the problem and I'm still not quite sure of 
  203.       the precise nature of the problem. 
  204.  
  205.    3. Apparently some proxy servers can't handle multiline responses to FTP 
  206.       commands. If you hit this problem, you might be able to solve it by 
  207.       deleting the file WELCOME.MSG. 
  208.  
  209.  
  210. ΓòÉΓòÉΓòÉ 4.5. Non-standard features ΓòÉΓòÉΓòÉ
  211.  
  212. NON-STANDARD FEATURES 
  213.  
  214. The program violates RFC959 in the following ways: 
  215.  
  216.    1. Extra commands SIZE and MDTM are implemented. 
  217.  
  218.    2. The SYST command returns a reply of UNIX rather than OS/2. I had to do 
  219.       this because the "correct" reply causes WebExplorer to misinterpret the 
  220.       directory listings, and I'm told that at least one Microsoft ftp client 
  221.       will refuse to connect to a server that identifies itself as OS/2. 
  222.  
  223.    3. The obsolete and non-official commands XMKD, XRMD, XPWD, XCUP, and XCWD 
  224.       are implemented.  (These became obsolete more than 10 years ago, and most 
  225.       ftp clients don't use them; but apparently one of the clients for Windows 
  226.       NT hasn't yet been updated to the current standard.) 
  227.  
  228.  
  229. ΓòÉΓòÉΓòÉ 5. Installation ΓòÉΓòÉΓòÉ
  230.  
  231. Installation 
  232.  
  233. See also De-installation 
  234.  
  235. You should have received this package in the form of a zip file. To install it, 
  236. simply unzip the file into a directory of your choice. (Presumably you've 
  237. already done this.)  The server is now ready to run. 
  238.  
  239. The server itself is the program called ftpd.exe.  You can run it either by 
  240. double-clicking on the desktop icon, or by entering the command "ftpd" in a 
  241. command-line session.  (In the latter case, make sure you're in the right 
  242. directory, otherwise you'll end up running the ftpd that was supplied with 
  243. OS/2.)  Most people will want to put a program object or shadow for ftpd into 
  244. the startup folder, so that the server will run each time the system is booted; 
  245. but that's up to you. 
  246.  
  247. Even though the server will work "out of the box", you still need to define the 
  248. user permissions so that clients can connect to the server. You can do this 
  249. either before running the server, or while it's running.  See Setting up the 
  250. User Permissions. 
  251.  
  252. The file source.zip is optional.  If you're not interested in the source code, 
  253. you can delete it. 
  254.  
  255. For some other options, see 
  256.  
  257.      Command line parameters 
  258.      Running from inetd 
  259.      Running FtpServer detached 
  260.      Welcome messages 
  261.  
  262.  
  263. ΓòÉΓòÉΓòÉ 6. De-installation ΓòÉΓòÉΓòÉ
  264.  
  265. De-installation 
  266.  
  267. FtpServer does not tamper with CONFIG.SYS or with other system files. If you 
  268. decide that you don't want to keep FtpServer, simply delete the directory into 
  269. which you installed it. 
  270.  
  271.  
  272. ΓòÉΓòÉΓòÉ 7. Setting up the User Permissions ΓòÉΓòÉΓòÉ
  273.  
  274.  User Permissions 
  275.  
  276.      General concepts 
  277.      Setting up users with the Setup program 
  278.      Manual configuration 
  279.  
  280.  
  281. ΓòÉΓòÉΓòÉ 7.1. User permissions: General concepts ΓòÉΓòÉΓòÉ
  282.  
  283.  GENERAL CONCEPTS 
  284.  
  285. Each user of the server has a login name (username), a password, and one or 
  286. more home directories.  Users may access their home directories, including any 
  287. subdirectories, but they cannot get at, or even see, any other directories in 
  288. the machine's file system.  Optionally, you can also block access to specified 
  289. subdirectories of their home directory. 
  290.  
  291. Note:  In this context, "user" refers to a username rather than to a person. 
  292. For example, you might have a number of different people all accessing the 
  293. server via the username "anonymous". As far as the server is concerned, they 
  294. are not separate users, but rather separate instances of the user called 
  295. "anonymous". 
  296.  
  297. The server looks looks up the user information in an INI file called FTPD.INI, 
  298. which should be in the same directory as ftpd.exe. This INI file is created and 
  299. maintained by the Setup utility, as explained below. 
  300.  
  301. There are two ways to create and edit the user permissions. 
  302.  
  303.    1. By using the Setup program that is supplied with FtpServer. This is the 
  304.       recommended method, for compatibility with future releases of FtpServer, 
  305.       and also because this method ensures that you produce syntactically 
  306.       correct permission files.  The procedure is described in the section 
  307.       Using the Setup utility. 
  308.  
  309.    2. Manually, using any text editor.  The details can be found in the section 
  310.       Manual configuration.  Manual configuration is supported for the benefit 
  311.       of existing FtpServer users who have become used to doing it this way; 
  312.       but it is not the recommended method, because it's too easy to make 
  313.       mistakes. 
  314.  
  315.  User categories 
  316.  
  317.  Each user is classified as one of the following. 
  318.  
  319.    G       Guest user, who has to provide an e-mail address as a password. 
  320.  
  321.    U       Normal user, who has to supply a password 
  322.  
  323.    N       User who does not need a password. 
  324.  
  325.    M       Manager: same as U, except that a manager gets some extra 
  326.            privileges. 
  327.  
  328.  Normally you would create one "manager" account for yourself, and use the G or 
  329.  U categories for all other users.  The N category is for those rare cases 
  330.  where you don't need to control access with a password. 
  331.  
  332.  Directory permissions 
  333.  
  334.  Each directory that is accessible to the user is described by some combination 
  335.  of the following four permission attributes. 
  336.  
  337.    V       Directory visible.  This should be set in most cases.  When it's not 
  338.            set, the client can't do a "change directory" to this directory, and 
  339.            it won't appear in directory listings. 
  340.  
  341.    R       Read permission.  If this is set then the client can download files 
  342.            from this directory. 
  343.  
  344.    W       Write permission.  If this is set then the client can upload files 
  345.            to this directory. 
  346.  
  347.    D       Delete permission.  If this is set then the client can delete files 
  348.            from this directory.  Note: to overwrite an existing file, both W 
  349.            and D permissions are needed. 
  350.  
  351.  Remark  It is possible for a user to be given read, write, and/or delete 
  352.          privileges to an invisible directory.  In such cases the users can 
  353.          perform the permitted operations only if they know the correct file 
  354.          name, including the directory name, because they won't see the 
  355.          directory name in a directory listing. 
  356.  
  357.  It's also possible for an invisible directory to have visible subdirectories. 
  358.  Users can get to those directories only if they know the path name, including 
  359.  the name of the invisible directory. 
  360.  
  361.  Multiple home directories 
  362.  
  363.  When a user has just one home directory, that directory appears to the user to 
  364.  be the root directory.  (The user does not see the true name of the 
  365.  directory.)  There is no way for users to see any directories other than the 
  366.  home directory and its subdirectories. 
  367.  
  368.  When a user has more than one home directory, each home directory has a 
  369.  "volume name" chosen by the system manager.  One use for multiple home 
  370.  directories is to give a user access to files on more than one disk drive. In 
  371.  that case, you might choose to use the drive letter as the volume name; but 
  372.  that's not compulsory, you can choose the volume names arbitrarily. 
  373.  
  374.  When the user logs in, each volume appears to be a subdirectory of the user's 
  375.  root directory.  Thus, the normal "change directory" commands can be used to 
  376.  step through the different volumes. 
  377.  
  378.  Remark: the volume name is irrelevant in the case of a single home directory, 
  379.  because in that case the user never gets to see the volume name. 
  380.  
  381.  
  382. ΓòÉΓòÉΓòÉ 7.2. Manual configuration ΓòÉΓòÉΓòÉ
  383.  
  384.  Manual configuration of users 
  385.  
  386. This section describes how to edit a permission file.  It can be skipped by 
  387. most people, because in most cases it's better to use the Setup program to 
  388. automate the editing. 
  389.  
  390. If the user information is already in the server's INI file (e.g. because you 
  391. used the Setup utility to add this user), then the first thing you need to do 
  392. is to use the StorePRM utility to create a PRM file for this user. (Of course 
  393. this step is not needed if you have an existing PRM file for the user.)  After 
  394. editing the PRM file, which you can do with any text editor, you can use the 
  395. LoadPRM utility to load the information back into the INI file. 
  396.  
  397. A PRM file is free-format, i.e. the exact formatting is not important; but, for 
  398. the sake of readability, I suggest that you use indentation etc. to make its 
  399. structure clearer. 
  400.  
  401. The file can include comments.  A comment is anything from the '%' sign to the 
  402. end of the current line.  Note, however, that comments will be stripped out 
  403. when the LoadPRM program loads the data into the server's INI file. 
  404.  
  405. File names containing spaces or special characters should be delimited by 
  406. either double quote marks ("...") or single quote marks ('...').  For "normal" 
  407. file names the quotation marks are optional.  (But see the warning at the end 
  408. of this page.) 
  409.  
  410. The first two things in a permission file are: 
  411.  
  412.    1. The user category code (G, U, N, M), as described in the General concepts 
  413.       section. 
  414.  
  415.    2. The password.  For a guest user, put "@" as the password. For an 'N' 
  416.       user, just supply a dummy entry here. 
  417.  
  418.  After that, you specify one or more volumes.  The volume information is in the 
  419.  form 
  420.  
  421.      <volume name> = <home directory> <directory descriptor> 
  422.  
  423.  The home directory must be given as a full path name, starting with a drive 
  424.  name and ending with the '/' character. 
  425.  
  426.  A <directory descriptor> gives the permissions for this home directory and all 
  427.  of its subdirectories.  It has the form 
  428.  
  429.      <code> <subdirectory info> 
  430.  
  431.  Both of these are optional.  The <code> can be any combination of 
  432.  
  433.    V+      Directory visible 
  434.    V-      Directory invisible 
  435.    R+      Allow reads (i.e. downloads) of files in this directory 
  436.    R-      Deny read 
  437.    W+      Allow write 
  438.    W-      Deny write 
  439.    D+      Allow delete 
  440.    D-      Deny delete 
  441.  
  442.  The permission codes are always to be interpreted relative to the parent 
  443.  directory's permission code.  That is, a directory has the same permissions as 
  444.  its parent, unless explicitly changed by adding and/or deleting permissions. 
  445.  
  446.  (For the home directory, the default permissions are: visible, read, no write, 
  447.  no delete.) 
  448.  
  449.  The <subdirectory info> is defined recursively.  It has the form 
  450.  
  451.      (  <item> ,  <item> ,  ...  , <item> ) 
  452.  
  453.  i.e. it is a comma-separated list of items, surrounded by parentheses.  Each 
  454.  <item> has the form 
  455.  
  456.      <directory name>  <directory descriptor> 
  457.  
  458.  where the <directory descriptor> follows exactly the same rules as the 
  459.  <directory descriptor> for the home directory.  That is, it can also contain 
  460.  things like comma-separated lists of subdirectory information. 
  461.  
  462.  If this sounds complicated, take a look at the supplied *.PRM files, and 
  463.  you'll soon pick up the pattern. 
  464.  
  465.  Note:  You don't have to list all of the subdirectories - only the ones whose 
  466.  permissions are different from the permissions of the parent directory. 
  467.  
  468.  Example 
  469.  
  470.  Suppose you want the user "anonymous" to have read access to the directory 
  471.  C:\users\pub; read and write access to C:\users\pub\upload; no access at all 
  472.  to C:\users\pub\private; and read access to all other subdirectories of 
  473.  C:\users\pub.  Then the permission file ANONYMOUS.PRM should have the 
  474.  following contents. 
  475.  
  476.       G                    % user category = guest
  477.       @                    % password = e-mail address
  478.       "C:/users/pub/" V+R+  % home directory
  479.         ( upload W+,       % allow write access to upload directory
  480.           private V-R- )   % deny all access to private directory
  481.  
  482.  Remark: FtpServer considers the forward slash (/) and backslash (\) to be 
  483.  equivalent in filename strings. 
  484.  
  485.  WARNING ABOUT POTENTIAL SYNTAX ERRORS 
  486.  
  487.  The software that parses a permission file tries to be as non-rigid as 
  488.  possible; for example, it does not insist that the characters in passwords, 
  489.  directory names, etc. be alphanumeric characters.  This flexibility comes at a 
  490.  price: you can write permission files that seem to be correct, but which are 
  491.  syntactically ambiguous. 
  492.  
  493.  For example, suppose that a permission file contains two home directory 
  494.  specifications: 
  495.  
  496.       C:/PUB/
  497.       D:/XYZ/UVW/
  498.  
  499.  This looks OK, but in fact it confuses the parser.  When the parser sees the 
  500.  "D" on the second line, it thinks you're trying to enable delete permission 
  501.  for the home directory on the preceding line.  Having consumed the "D", it 
  502.  then decides that the drive name for the second directory is ":". 
  503.  
  504.  The way to solve this problem is to put a semicolon at the end of the first 
  505.  line (or the beginning of the second line), to separate the two 
  506.  specifications. 
  507.  
  508.  
  509. ΓòÉΓòÉΓòÉ 7.3. Manager privileges ΓòÉΓòÉΓòÉ
  510.  
  511. Manager privileges 
  512.  
  513. A manager account is the same as a normal user account, except that a manager 
  514. has a few extra privileges. 
  515.  
  516.      Managers can see system and hidden files in directory listings; other 
  517.       users cannot. 
  518.  
  519.      Managers are allowed to use the SITE MNGR commands. 
  520.  
  521.  
  522. ΓòÉΓòÉΓòÉ 8. The Setup utility ΓòÉΓòÉΓòÉ
  523.  
  524.  The program SETUP.EXE has three functions: 
  525.  
  526.      To set the parameters that the server will use when it starts up. 
  527.      To place controls on which IP addresses may access the server. 
  528.      To create and edit user permissions. 
  529.  
  530.  Use the F5 function key on the keyboard to toggle among these functions. 
  531.  
  532.  The parameter settings are stored in a file FTPD.INI.  The server reads its 
  533.  INI file as it starts up, so any changes you make will not take effect until 
  534.  the next time you start the server. 
  535.  
  536.  Exception: the user permissions are not read until a user attempts to log in. 
  537.  You may therefore alter the user permissions while the server is running, and 
  538.  the alterations will affect the next user to log in. 
  539.  
  540.  Now read 
  541.  
  542.      Setting the server parameters 
  543.      Security settings 
  544.      Modifying user permissions 
  545.  
  546.  
  547. ΓòÉΓòÉΓòÉ 8.1. Setting the server parameters ΓòÉΓòÉΓòÉ
  548.  
  549. Setting the server parameters 
  550.  
  551. When you run SETUP.EXE, you get a screen showing the following items. 
  552.  
  553.  Server port 
  554.            Unless you are doing something nonstandard (for example, running two 
  555.            ftp servers on the same machine) this should always be 21. 
  556.  
  557.  Maximum number of users 
  558.            This specifies how many clients will be allowed to use the server 
  559.            simultaneously. I usually set this to 10.  Higher values will, of 
  560.            course, increase the load on your processor. 
  561.  
  562.            Note: this is a global maximum.  You may also set this to a high 
  563.            value, and then control the number of users on a per-username basis. 
  564.  
  565.  Maximum number of guest users 
  566.            This typically should be slightly less than the number specified for 
  567.            the maximum number of users, to reserve one or more login slots for 
  568.            the system manager and other non-guest users. 
  569.  
  570.  Free space threshold (MB) 
  571.            This specifies the amount of free space that must be available on a 
  572.            drive for uploads to be enabled.  If the free space, in megabytes, 
  573.            falls below this level then uploads will be disabled. 
  574.  
  575.  User logging level 
  576.            The server creates a log file called FTPUSERS.LOG.  (If you delete 
  577.            the file, it will be re-created.  It would be a good idea to delete 
  578.            it, or move it to an archive, every month or so, so that it does not 
  579.            grow too large.)  The user logging level controls how much detail 
  580.            gets written to this file. 
  581.  
  582.               0           No logging 
  583.  
  584.               1           Log successful file transfers 
  585.  
  586.               2           Log successful and unsuccessful file transfers 
  587.  
  588.               3           Log all users, even those who didn't transfer any 
  589.                           files 
  590.  
  591.  Timeout (seconds) 
  592.            The time that a client session may remain idle before the user is 
  593.            evicted. You will find that many ftp clients, especially web 
  594.            browsers, don't log out properly, so their sessions have to be 
  595.            killed with the timeout mechanism. 
  596.  
  597.  Transaction logging 
  598.            You can choose to send a detailed log to the screen, or to a disk 
  599.            file, or both. The disk file is called FTPTRANS.LOG, and it is 
  600.            updated approximately once every 15 minutes if this feature is 
  601.            enabled. 
  602.  
  603.            Warning: Transaction logging can create very large log files.  I 
  604.            suggest that you don't enable this feature unless you're trying to 
  605.            track down a problem. 
  606.  
  607.  To modify any of these parameters, use the up/down arrow keys to get to the 
  608.  desired item, then type in the new value.  (The backspace, Insert, Delete, 
  609.  Home, and End keys will also work during editing.)  The new value is accepted 
  610.  when you type the Enter key, or when you use the function keys to go to 
  611.  another field. 
  612.  
  613.  When you've finished editing, use the Esc key to exit from the Setup program, 
  614.  or type F5 to get to the security screen. 
  615.  
  616.  
  617. ΓòÉΓòÉΓòÉ 8.2. Security settings ΓòÉΓòÉΓòÉ
  618.  
  619. Security settings 
  620.  
  621. To modify the security settings, run SETUP.EXE, and then type the F5 function 
  622. key on the keyboard to get to the "Security" screen page. 
  623.  
  624. At the top of this page there is a field called the "Same IP limit".  This 
  625. specifies the maximum number of users that can be connected simultaneously from 
  626. the same IP address.  It is primarily a protection against users who hog the 
  627. server by logging in more than once. 
  628.  
  629. Set this value to whatever you want, finishing with the "Enter" or "cursor 
  630. down" key to confirm the new value.  The "cursor down" key will take you to the 
  631. IP address allow/deny lists, as described below.  When you've finished setting 
  632. the values on this page, type F5 to get to the user permission editor. 
  633.  
  634. Restricting access to certain IP addresses 
  635.  
  636. The two large boxes on this screen page are the "allow" and "deny" lists of IP 
  637. addresses.  These are for putting restrictions on which remote hosts are 
  638. allowed to log into the server. (If you don't need this feature, just leave the 
  639. two lists empty.) The server interprets the lists as follows. 
  640.  
  641.      If a client address matches one of the entries in the "allow" list, then 
  642.       the client is allowed to proceed, and the "deny" list is ignored. 
  643.  
  644.      Otherwise, the client is allowed to connect only if its IP address does 
  645.       not match any of the entries in the "deny" list. 
  646.  
  647.  Each list entry consists of two components, an address and a mask.  Each of 
  648.  these is expressed in "dotted quad" notation: a four-byte value where each 
  649.  byte has its value written out in decimal. (This is a standard convention for 
  650.  writing IP addresses.) A client address matches an entry if 
  651.  
  652.      (client IP address) AND mask = (IP address in the list) 
  653.  
  654.  where AND means the bit-by-bit Boolean "logical AND" operation. 
  655.  
  656.  Note, in particular, the two extreme cases: 
  657.  
  658.      If the mask is 255.255.255.255, then we are specifying an exact match 
  659.       between the client IP address and the address in the list. 
  660.  
  661.      If the mask is 0.0.0.0, then any IP address will match this entry. You 
  662.       can use this to specify an "everything else" condition. 
  663.  
  664.  Example 1. If you want to lock out all machines with IP address in the range 
  665.  123.45.67.0 to 123.45.67.127, put an entry in the "deny" list with address 
  666.  123.45.67.0 and mask 255.255.255.128.  The "allow" list can be left empty in 
  667.  this case. 
  668.  
  669.  Example 2. Suppose you want to give access only to your local network, which 
  670.  has addresses in the range 123.45.66.0 to 123.45.67.255.  You can do this by 
  671.  putting an entry in the "allow" list with address 123.45.66.0 and mask 
  672.  255.255.254.0.  To lock out everyone else, put an entry in the "deny" list 
  673.  with mask 0.0.0.0. 
  674.  
  675.  Example 3. To allow access to 123.45.67.89, but to lock out everyone else in 
  676.  123.45.67.*, you can 
  677.  
  678.      put an entry in the "allow" list with address 123.45.67.89 and mask 
  679.       255.255.255.255 
  680.      put an entry in the "deny" list with address 123.45.67.0 and mask 
  681.       255.255.255.0 
  682.  
  683.  
  684. ΓòÉΓòÉΓòÉ 8.3. Modifying user permissions ΓòÉΓòÉΓòÉ
  685.  
  686. Modifying user permissions 
  687.  
  688. To modify the user permissions, run SETUP.EXE, and then type the F5 function 
  689. key twice to get the the "Users" screen page.  This will give you a list of all 
  690. existing users.  (The first time you run the program, the list will probably be 
  691. empty.) 
  692.  
  693. From this screen, you can add, delete, or modify users.  When you've finished, 
  694. use the F5 function key to get back to the main Setup screen. 
  695.  
  696. Deleting a user 
  697.  
  698. Use the up/down arrow keys to get to the user you want to delete, and type the 
  699. Del (delete) key. 
  700.  
  701. Adding a new user 
  702.  
  703. Type A, and then proceed as for Editing a user's permissions. 
  704.  
  705. Editing the permissions of an existing user 
  706.  
  707. Type E, and then follow the instructions in the section Editing a user's 
  708. permissions. 
  709.  
  710.  
  711. ΓòÉΓòÉΓòÉ 8.4. Editing a user's permissions ΓòÉΓòÉΓòÉ
  712.  
  713. Editing a user's permissions 
  714.  
  715. You get to this point by running the Setup program, typing F5 to get to the 
  716. user editor, and then using one of the "A" (add user) or "E" (edit user) 
  717. options. 
  718.  
  719. By now you should have four fields near the top of the screen. 
  720.  
  721.    User name 
  722.            The name that the user will use when logging in. 
  723.  
  724.    Category 
  725.            One of User, Guest, NoPassword, or Manager. 
  726.  
  727.    Password 
  728.            This user's password. 
  729.  
  730.    User limit 
  731.            The maximum number of simultaneous sessions with this user name. (If 
  732.            you don't want such a control, just make this number larger than the 
  733.            global user limit.) 
  734.  
  735.  Use the up/down arrow keys to get to the field you want to edit, and then 
  736.  modify it as necessary.  For the "Category" field, use the left/right arrow 
  737.  keys to select a category. 
  738.  
  739.  Warning: If you change the user name, the permissions for the previous user 
  740.  name will be deleted.  You should also avoid using a user name that is the 
  741.  same as for some other user.
  742.  
  743.  Next, you have to go to the list of home directories, in the bottom half of 
  744.  the screen.  (For a new user, this list will initially be empty.)  Use the 
  745.  down-arrow key to get to the list, and then type either A (to add a home 
  746.  directory) or E (to modify an existing entry in the list of home directories). 
  747.  
  748.  This gives you a new screen, where the top two lines are 
  749.  
  750.   Virtual drive name 
  751.            This is the name that the user will see as the "directory name" for 
  752.            this home directory. 
  753.  
  754.   Home directory 
  755.            This should be a full path name, starting with a physical drive name 
  756.            and finishing with the '/' character.  For example, it could be 
  757.            "C:/users/pub/" (without the quotation marks).  In this field, the 
  758.            software considers the characters '/' and '\' to be equivalent. 
  759.  
  760.  After editing these two fields, use the "cursor down" key to go to the 
  761.  "directories" box on the screen.  There will be a short pause while the 
  762.  program builds a list of all subdirectories.  (If you have many 
  763.  subdirectories, it will be a long pause.) 
  764.  
  765.  You are then presented with a list of subdirectories of this home directory. 
  766.  To the left of each directory name, you will see a code consisting of one or 
  767.  more of the letters "VRWD".  The meanings of these user permission codes are 
  768.  explained in the General concepts section. 
  769.  
  770.  You might also see a "+" in front of some directory names.  This indicates 
  771.  that this directory is collapsed, i.e. it has subdirectories which are not at 
  772.  present displayed on the screen. 
  773.  
  774.  At this point, you have the following options. 
  775.  
  776.      You can navigate through the list of directories with the cursor up/down 
  777.       keys, and also with the Home, End, PageUp, and PageDown keys. 
  778.  
  779.      To change a permission, type one of the characters V, R, W, or D. This 
  780.       toggles the state of the corresponding permission code for the currently 
  781.       selected directory. 
  782.  
  783.      Typing the "I" key gives the selected directory a copy of the current 
  784.       permissions of its parent. 
  785.  
  786.      The "P" key copies the permissions of the currently selected directory to 
  787.       all of its subdirectories. Use this if you want to change an entire 
  788.       subtree in one operation. 
  789.  
  790.      The "-" key collapses a directory by removing its subdirectories from the 
  791.       screen listing. (But these subdirectories will still be affected by the 
  792.       "P" option.) To get the subdirectories back, type the "+" key. 
  793.  
  794.  When you've finished editing the permissions, type X to return to the previous 
  795.  screen.  Alternatively, you can get to the previous screen with the "cursor 
  796.  up" key. 
  797.  
  798.  Now you're back in the list of home directories.  At this point you have the 
  799.  choice of adding more home directories, or leaving this list with the "Esc" or 
  800.  "cursor up" keys. 
  801.  
  802.  When you've finished setting up all users, type the F5 key to get back to the 
  803.  main page of the Setup program. 
  804.  
  805.  
  806. ΓòÉΓòÉΓòÉ 9. Running the server ΓòÉΓòÉΓòÉ
  807.  
  808. Running the server 
  809.  
  810. The server executable is called FTPD.EXE.  You can run this the way you run any 
  811. other OS/2 program: from the command-line, by clicking on an icon, from the 
  812. Startup folder, etc.  If you're running several server applications, then the 
  813. most obvious choice is to put a command to start the server in the command file 
  814. \TCPIP\BIN\TCPSTART.CMD. 
  815.  
  816. Normally the server takes its configurable parameters from the INI file created 
  817. by the Setup program.  You may, however, override these parameters by 
  818. specifying command-line parameters. 
  819.  
  820. You also have the options of running the server from inetd or running the 
  821. server as a detached program. 
  822.  
  823. Once the server is running, two keyboard commands are available. 
  824.  
  825.    G       Gradual shutdown.  No new users are accepted.  The program will 
  826.            terminate when the existing users have logged off (or timed out), or 
  827.            when a Q comand is issued. 
  828.  
  829.    Q       Quick shutdown.  The program closes down even if there are logged-in 
  830.            users. 
  831.  
  832.  
  833. ΓòÉΓòÉΓòÉ 9.1. Command line parameters ΓòÉΓòÉΓòÉ
  834.  
  835. Command line parameters 
  836.  
  837. Normally you don't need any parameters when invoking FTPD.EXE, because the 
  838. server takes its parameters from the INI file.  (And the contents of the INI 
  839. file are controlled by the Setup program.)  You may, however, override the 
  840. parameters in the INI file by giving command-line parameters. 
  841.  
  842. There are several optional parameters. These all have the form of a letter 
  843. followed by a (decimal) number, and they can be given in any order. 
  844.  
  845.    D       Detailed transaction logging (default 0). 
  846.  
  847.                 0         No logging 
  848.                 1         Logging to the disk file FTPTRANS.LOG 
  849.                 2         Logging to the screen 
  850.                 3         Logging to both the screen and the disk file 
  851.  
  852.    F       Free space threshold (megabytes).  Users can't upload to a drive 
  853.            that has less than this amount of free space available. The default 
  854.            is 10. 
  855.  
  856.    G       Maximum number of guest users.  If you make this smaller than the 
  857.            value for M (see below), you effectively reserve some slots for 
  858.            non-guest users.  The default is M-1. 
  859.  
  860.    L       User logging option (default 1). 
  861.  
  862.                 0         No logging 
  863.                 1         Logging of successful file transfers 
  864.                 2         Logging of successful and unsuccessful file transfers 
  865.                 3         Logging of all users 
  866.  
  867.            The log is a text file called FTPUSERS.LOG.  You can edit it or 
  868.            delete it without doing any harm. 
  869.  
  870.    M       Maximum number of simultaneous users.  To limit the number to 12, 
  871.            for example, use the command 
  872.                   ftpd m12 
  873.            The default is 10. 
  874.  
  875.    P       The server's port number.  To make the server listen on port 5003, 
  876.            for example, you start the program with the command 
  877.                   ftpd p5003 
  878.            The default port number is 21. 
  879.  
  880.    T       Timeout limit, i.e. the time before an inactive user is forcibly 
  881.            removed.  The value is in seconds, and the default is 900. 
  882.  
  883.  
  884. ΓòÉΓòÉΓòÉ 9.2. Running from inetd ΓòÉΓòÉΓòÉ
  885.  
  886. Running the server from inetd 
  887.  
  888. Inetd, which is part of the Warp 4 distribution, is a "listener" program that 
  889. can intercept incoming connection attempts, and start up a server when needed. 
  890.  
  891. The advantage is that FtpServer doesn't actually get loaded into main memory 
  892. until a client wants to connect.  Thus, it might be a good option if you expect 
  893. clients to connect only occasionally. 
  894.  
  895. The disadvantage is that a separate copy of the server is started for each 
  896. logged-in user.  This makes inetd a bad choice if you expect lots of 
  897. connections. 
  898.  
  899. If you want to run FtpServer from inetd, the way to do it is as follows: 
  900.  
  901.    1. Ensure that inetd will be run the next time you boot. The usual way of 
  902.       doing this is to include the line 
  903.             start /min inetd 
  904.       in your TCPSTART.CMD, and to invoke TCPSTART.CMD from your startup 
  905.       folder.  TCPSTART.CMD may be found in the directory \tcpip\bin. 
  906.  
  907.    2. Edit the file \mptn\etc\inetd.lst so that it contains the line 
  908.          ftp tcp start /C /min d:\Apps2\FtpServer\ftpd.exe 
  909.       (adjusting the path so that it refers to the directory where you've 
  910.       installed FtpServer). 
  911.  
  912.  Note:  In earlier releases the inetd users had to use a file called ftpd.cmd. 
  913.  That command file is now obsolete. 
  914.  
  915.  You may also include parameters on the inetd.lst line that invokes ftpd.exe, 
  916.  subject to the following conditions: 
  917.  
  918.    1. The M parameter is useless, because in this mode of operation the program 
  919.       is handling exactly one user. 
  920.  
  921.    2. The P parameter, if present, will be ignored.  When running from inetd, 
  922.       you don't get a choice of ports. 
  923.  
  924.  In principle you can now start inetd.  In practice I've found that inetd 
  925.  doesn't release ports reliably, so if you already have inetd running you'll 
  926.  probably have to re-boot. 
  927.  
  928.  Remark: I'm starting to suspect that inetd adds more overhead than it saves, 
  929.  so I've reverted to not using it on my own machine. 
  930.  
  931.  
  932. ΓòÉΓòÉΓòÉ 9.3. Running FtpServer detached ΓòÉΓòÉΓòÉ
  933.  
  934. Running the server as a detached program 
  935.  
  936. If you want to run the server detached, the appropriate command is 
  937.     DETACH FTPD 
  938. (with parameters, if desired).  Note that a detached program does not have any 
  939. way of doing screen output or keyboard input, so you can't get any screen 
  940. messages in this case.  Nor can you use the keyboard G and Q commands. 
  941.  
  942. Although you can't shut down the server from the keyboard in this case, you can 
  943. still shut it down by using the SITE MNGR commands. 
  944.  
  945.  
  946. ΓòÉΓòÉΓòÉ 9.4. Welcome messages ΓòÉΓòÉΓòÉ
  947.  
  948. Welcome messages 
  949.  
  950. If you want to give a message to users when they log in, put a plain text file 
  951. called WELCOME.MSG or WELCOME2.MSG in the same directory as ftpd.exe. 
  952. WELCOME.MSG, if present, is displayed to the user when the initial connection 
  953. is made.  WELCOME2.MSG, if present, is displayed to the user after the username 
  954. and password have been accepted.  To avoid confusion, you should probably 
  955. choose to have only one of these two options. 
  956.  
  957. You can also put a text file called DIR.MSG in any user directory. Users will 
  958. get this message the first time they go to that directory. 
  959.  
  960. There is a limited form of macro expansion available in these message files. 
  961. The following macros may be included. 
  962.  
  963.    %m      Expands to a character string giving the maximum allowed number of 
  964.            users with the current username. 
  965.  
  966.    %M      Expands to a character string giving the global maximum allowed 
  967.            number of users. 
  968.  
  969.    %t      Expands to a string giving the local time. 
  970.  
  971.    %T      For now, this is the same as %t. 
  972.  
  973.    %u      Expands to a string giving a user number within this user's group. 
  974.  
  975.    %U      Expands to a string giving this user's global user number. 
  976.  
  977.    %%      The '%' character. 
  978.  
  979.  
  980. ΓòÉΓòÉΓòÉ 9.5. The SITE commands ΓòÉΓòÉΓòÉ
  981.  
  982. The SITE commands 
  983.  
  984. The SITE PERM command 
  985.  
  986. The command SITE PERM returns a three-character string showing whether you have 
  987. read, write, and/or delete permission for the current directory. (This command 
  988. was added while I was testing a new feature.  It might be withdrawn in future 
  989. versions, because it's not particularly useful for most users.) 
  990.  
  991. The SITE MNGR commands 
  992.  
  993. Commands in this group may be used only from a manager account. Currently the 
  994. following options are available. 
  995.  
  996.  SITE MNGR EXIT 
  997.            Shuts down the server.  (Don't do this unless you really mean it!) 
  998.  
  999.  SITE MNGR GXIT 
  1000.            Shuts down the server after the current users have logged out - i.e. 
  1001.            the same action as for the keyboard G command. 
  1002.  
  1003.  SITE MNGR KILL nnn 
  1004.            Forcibly logs out user number nnn. The number must match the one 
  1005.            returned by the SITE MNGR LIST command. 
  1006.  
  1007.  SITE MNGR LIST 
  1008.            Returns a list of currently logged-in users. The main purpose of 
  1009.            this command is to support the Monitor utility. 
  1010.  
  1011.  
  1012. ΓòÉΓòÉΓòÉ 10. The Monitor utility ΓòÉΓòÉΓòÉ
  1013.  
  1014. The Monitor utility 
  1015.  
  1016. The program MONITOR.EXE allows the system manager to see who is currently 
  1017. logged in, and to kill sessions where necessary.  This program can be run 
  1018. either on the same machine as the server, or remotely. 
  1019.  
  1020. When you start the program, it attempts to connect to the server.  If it fails 
  1021. to establish a connection, this might mean that the server is not running. 
  1022. Alternatively, it might mean that you are attempting to connect to the wrong 
  1023. machine, or to the right machine with the wrong manager account. In the latter 
  1024. case, see the instructions for Setting up the Monitor parameters. 
  1025.  
  1026. To kill a client session, use the cursor up/down keys to get to the desired 
  1027. session, and then type the K key. 
  1028.  
  1029. To shut down the server, type Ctrl/K.  (Hold down the Ctrl key while typing K.) 
  1030. You will be asked to confirm the shutdown by typing either G (for a gradual 
  1031. shutdown) or Q (for a quick shutdown). 
  1032.  
  1033. To close the Monitor program, type the X key. 
  1034.  
  1035. Hint:  If you want to use less screen space, issue the command 
  1036.      MODE CO80,10 
  1037. before running Monitor.exe. 
  1038.  
  1039.  
  1040. ΓòÉΓòÉΓòÉ 10.1. Setting up the Monitor parameters ΓòÉΓòÉΓòÉ
  1041.  
  1042. Setting up the Monitor parameters 
  1043.  
  1044. When running MONITOR.EXE, typing S on the keyboard takes you to the setup 
  1045. screen. There you will see four fields that have to be filled in. 
  1046.  
  1047.   Server hostname 
  1048.            This specifies the machine on which the server is running, for 
  1049.            example mymachine.here.net.  If the machine has a fixed IP address, 
  1050.            you can avoid a nameserver lookup by specifying a numeric address, 
  1051.            for example 123.45.67.89 
  1052.  
  1053.   Server port 
  1054.            This should normally be 21, but you might have set up the server to 
  1055.            accept connections from a non-standard port. 
  1056.  
  1057.   User name 
  1058.            This must be the username for a manager account. 
  1059.  
  1060.   Password 
  1061.            The password for the manager account. 
  1062.  
  1063.  When you've finished filling in these details, press the Esc key to return to 
  1064.  the Monitor main screen. 
  1065.  
  1066.  
  1067. ΓòÉΓòÉΓòÉ 11. The LoadPRM and StorePRM utilities ΓòÉΓòÉΓòÉ
  1068.  
  1069. The LoadPRM utility 
  1070.  
  1071. This utility is needed if you want to manually edit user permission files. It 
  1072. copies information from a PRM file into the server's FTPD.INI.  For example, 
  1073. the command 
  1074.  
  1075.        loadprm example
  1076.  
  1077. takes the information in the file EXAMPLE.PRM and creates or updates an entry 
  1078. in the INI file for a user called "example". 
  1079.  
  1080. Wildcards are permitted. To load the information from all the PRM files in the 
  1081. current directory, use the command 
  1082.  
  1083.        loadprm *
  1084.  
  1085. You do not have to restart the server. The updated user information will take 
  1086. effect the next time a user logs in. 
  1087.  
  1088. The StorePRM utility 
  1089.  
  1090. This utility creates a PRM file by copying the user information from FTPD.INI. 
  1091. You would use it if the INI file already contains user data that you want to 
  1092. edit manually. For example, the command 
  1093.  
  1094.        storeprm example
  1095.  
  1096. takes the information in the INI file for the user called "example", and uses 
  1097. it to create a file EXAMPLE.PRM. (If EXAMPLE.PRM already exists, the original 
  1098. copy is renamed EXAMPLE.BAK.) 
  1099.  
  1100. Wildcards are permitted. To create PRM files for all the existing users, use 
  1101. the command 
  1102.  
  1103.        storeprm *
  1104.  
  1105.  
  1106. ΓòÉΓòÉΓòÉ 12. Development notes ΓòÉΓòÉΓòÉ
  1107.  
  1108.      Development tools 
  1109.  
  1110.      Why Modula-2? 
  1111.  
  1112.      Known bugs 
  1113.  
  1114.      Unresolved issues 
  1115.  
  1116.      Reporting errors 
  1117.  
  1118.      Year 2000 compliance 
  1119.  
  1120.  
  1121. ΓòÉΓòÉΓòÉ 12.1. Development tools ΓòÉΓòÉΓòÉ
  1122.  
  1123. Development tools 
  1124.  
  1125. Some people have asked about the compiler I'm using.  (I guess a lot of people 
  1126. didn't realise that there were Modula-2 compilers for OS/2.)  It's XDS 
  1127. Modula-2, OS/2 native mode version.  You can find out about this, and other 
  1128. Modula-2 compilers for OS/2, at the web page 
  1129.    http://www.ee.newcastle.edu.au/users/staff/peter/os2/os2m2.html 
  1130. (I'm getting a little behind on keeping my web pages up to date, but the 
  1131. information is still basically correct, only the version numbers have changed.) 
  1132.  
  1133. The XDS home page is at 
  1134.    http://www.xds.ru/ 
  1135. This is well worth visiting, because the XDS development team often has "try 
  1136. before you buy" versions of their compilers available for download. 
  1137.  
  1138. FtpServer uses some of the modules from the PMOS/2 library. If you want to know 
  1139. more about PMOS/2, you'll also find that on my web pages.  Source code is 
  1140. available.  My web pages are at 
  1141. http://www.ee.newcastle.edu.au/users/staff/peter/Moylan.html. 
  1142.  
  1143. This documentation was prepared with IBM's IPFC help compiler. 
  1144.  
  1145.  
  1146. ΓòÉΓòÉΓòÉ 12.2. Why Modula-2? ΓòÉΓòÉΓòÉ
  1147.  
  1148. Why Modula-2? 
  1149.  
  1150. I'm often asked why I chose to code FtpServer in Modula-2.  Everyone else seems 
  1151. to be using C or C++, so why don't I? 
  1152.  
  1153. The short answer is that I don't think much of the "everyone else uses it" 
  1154. argument.  If popularity was more important to me than technical merit, I 
  1155. wouldn't be using OS/2. 
  1156.  
  1157. The long answer is contained in a document called "The Case Against C", which 
  1158. used to be found at ftp://ee.newcastle.edu.au/.  This server is temporarily 
  1159. unavailable at present, so I'll try to find a new home for the document. 
  1160.  
  1161. And the medium-length answer is on this page. 
  1162.  
  1163. To begin with, run-time efficiency is not as big an issue as most people seem 
  1164. to think it is.  With modern compiler technology, the main programming 
  1165. languages (apart from things like BASIC and its derivatives) give about the 
  1166. same run-time efficiency.  C and C++ lose out a little because their low-level 
  1167. constructs make it hard for the compiler to do a good job at optimisation; the 
  1168. figures I've seen tend to suggest that a program written in Modula-2 runs a 
  1169. little faster than the same program written in C or C++. However, the 
  1170. difference is typically less than 5%, and hardly worth worrying about. 
  1171.  
  1172. So the big issue is development efficiency.  For a job like this we can rule 
  1173. out languages like BASIC and REXX because they're a little too crude; and we 
  1174. can rule out languages like Fortran because of their poor support for "systems 
  1175. programming" tasks.  We can also rule out a host of lesser-known languages 
  1176. because of the unavailability of OS/2 compilers.  That leaves us with Pascal, 
  1177. Ada, Oberon, Modula-2, C, and C++. 
  1178.  
  1179. I don't use Pascal because Modula-2 is basically an upgraded Pascal, and I 
  1180. might as well use the improved version. 
  1181.  
  1182. I haven't looked into the availability of Ada compilers for OS/2; but in any 
  1183. case I don't like Ada because of its complexity.  The bigger a language is, the 
  1184. more things there are to go wrong. 
  1185.  
  1186. Oberon is a more subjective matter.  Some people will tell you that Oberon is 
  1187. the successor to Modula-2, and is a superior programming language.  My personal 
  1188. opinion is that Oberon has deleted some of the features that make Modula-2 a 
  1189. good language.  I agree, however, that this issue is not entirely clear-cut. 
  1190.  
  1191. That brings us to C and C++.  I've done a lot of C and C++ programming over the 
  1192. years, and it's left me with the feeling that those languages are major 
  1193. barriers to programming efficiency.  It takes me roughly twice the time to get 
  1194. a C or C++ program working as it does to get a comparable Modula-2 program 
  1195. working.  (On some projects I've kept logs to verify this.)  The coding time is 
  1196. roughly the same, but there's a major difference in debugging time.  Everyone I 
  1197. know writes buggy software in C and C++, and then they take forever trying to 
  1198. track down the bugs.  Some developers give up, and sell the software with the 
  1199. bugs still included. 
  1200.  
  1201. There are two main reasons why C software is so bug-prone. 
  1202.  
  1203.    1. Lack of type safety.  C is designed in such a way that the compiler can't 
  1204.       do much error checking, so the compiler gives no warnings for things 
  1205.       that, in a type-safe language, would be reported as errors at compile 
  1206.       time.  You don't see the errors until execution time, and then you're 
  1207.       left wondering what caused the error. 
  1208.  
  1209.    2. Poor support for modular programming.  You can break up a C program into 
  1210.       modules, but they're not truly independent of one another.  A slight 
  1211.       change in one module can have catastrophic effects on other modules. 
  1212.       Once a project grows moderately large, you lose control of your own code. 
  1213.  
  1214.  C++ is a little better in these two respects, but C++ has problems of its own. 
  1215.  The language designers tried to graft high-level features onto a low-level 
  1216.  language, and the result is a mass of inconsistency.  A C++ reference manual 
  1217.  is typically several times as thick as manuals for other programming 
  1218.  languages, because every rule has a maze of exceptions and special cases. 
  1219.  
  1220.  In addition, I've noticed that a lot of C++ programmers seem to have adopted 
  1221.  the philosophy of "let's try this, and hope that it works".  The notion that 
  1222.  you shouldn't write code that you don't understand seems to have become 
  1223.  unfashionable.  Maybe that's the fault of the language (and its libraries), 
  1224.  maybe not.  In any case, it's not the way I prefer to work. 
  1225.  
  1226.  Ultimately, the reason I use Modula-2 is that it lets me get applications 
  1227.  working quickly, it gives me control of large projects, and it doesn't force 
  1228.  me to spend huge amounts of time on debugging.  I'm too old to enjoy the 
  1229.  thrill of tracking down obscure bugs.  I like to get something working, and 
  1230.  then be free to move on to other projects. 
  1231.  
  1232.  Of course, it's difficult to guarantee that any piece of software is bug-free, 
  1233.  no matter what development tools you use.  But I can have the next-best thing, 
  1234.  which is an acceptably small error rate. 
  1235.  
  1236.  
  1237. ΓòÉΓòÉΓòÉ 12.3. Known bugs ΓòÉΓòÉΓòÉ
  1238.  
  1239. KNOWN BUGS IN SERVER 
  1240.  
  1241.      Server shutdown does not work correctly when using version 4.02k of the 
  1242.       TCP/IP stack, although it does work with earlier versions.  Other 
  1243.       information I've received seems to indicate that *ALL* server 
  1244.       applications misbehave with version 4.02k, so it looks as if the fault 
  1245.       lies in the TCP/IP implementation. I have fixed the problem for version 
  1246.       4.02o, but the fix might not work with 4.02k - my impression is that 
  1247.       versions between k and o are seriously buggy. 
  1248.  
  1249.      Uploads not accepted if your free disk space is greater than about 4000 
  1250.       gigabytes.  There doesn't seem to be any urgent need to fix this just 
  1251.       yet, but at the rate disk sizes are growing ... 
  1252.  
  1253.  See also Unresolved issues 
  1254.  
  1255.  
  1256. ΓòÉΓòÉΓòÉ 12.4. Unresolved issues ΓòÉΓòÉΓòÉ
  1257.  
  1258. Unresolved issues 
  1259.  
  1260. These are problems that various people have reported, but which I haven't been 
  1261. able to duplicate. I'd be interested in hearing from anyone who can confirm 
  1262. either that the problem really exists, or that it's now fixed. 
  1263.  
  1264.      Reported: the server can be crashed by a client running JavaScript. This 
  1265.       problem is still a mystery to me, I haven't been able to track down 
  1266.       what's going on. 
  1267.  
  1268.  
  1269. ΓòÉΓòÉΓòÉ 12.5. Year 2000 compliance ΓòÉΓòÉΓòÉ
  1270.  
  1271. Year 2000 compliance 
  1272.  
  1273. According to my tests, FtpServer should continue running correctly until 31 
  1274. December 2079.  (It might also continue working after that; but the OS/2 system 
  1275. clock will not allow me to set the date to 2080 or later.)  This assumes that 
  1276. you are using HPFS disks. 
  1277.  
  1278. Systems using the FAT file system will stop working in 2038. This has nothing 
  1279. to do with FtpServer; it's a fundamental limitation of FAT. 
  1280.  
  1281.  
  1282. ΓòÉΓòÉΓòÉ 12.6. Reporting errors ΓòÉΓòÉΓòÉ
  1283.  
  1284. If you find any error that's not mentioned in this document, please report it 
  1285. to peter@ee.newcastle.edu.au.  The following information would be useful in 
  1286. tracking down the cause of the error: 
  1287.  
  1288.      The version number of the version you are using. 
  1289.  
  1290.      The file errinfo.$$$, if it exists. 
  1291.  
  1292.      Some information about what the server was doing at the time the problem 
  1293.       occurred; for example, the last few lines of the transaction log. 
  1294.