home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ftpsr085.zip / ftpserver.INF (.txt) < prev    next >
OS/2 Help File  |  2000-07-04  |  68KB  |  2,105 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.85. 
  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/os2/software.html. 
  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.)  The price 
  49. is $20 (US dollars). 
  50.  
  51. From Europe 
  52.  
  53. This works best for people living in the European Union.  (Warning: check first 
  54. whether your bank is going to charge you transfer fees. They shouldn't, but 
  55. I've heard of exceptions.)  You have two options: 
  56.  
  57.      Transfer ΓòÆ20, or the equivalent in Belgian francs, to the following bank 
  58.       account 
  59.  
  60.            Marion Gevers 
  61.            Account number 220-0586389-60 
  62.            G╨Æn╨Ærale de Banque (Belgium) 
  63.            Mention: FtpServer 
  64.  
  65.       and send an e-mail to peter@ee.newcastle.edu.au to confirm that you've 
  66.       done it. 
  67.  
  68.      Send a Eurocheque for 750 Belgian francs to 
  69.  
  70.            Peter Moylan 
  71.            91 Harriet Street 
  72.            Waratah, NSW 2298 
  73.            Australia 
  74.  
  75.  Payment directly to me in Australia 
  76.  
  77.  This is a more attractive option for people in Australia.  From other 
  78.  countries, it's not a good idea because of the bank charges on international 
  79.  transfers.  (Please don't send non-Australian currency to an Australian bank, 
  80.  because then I get hit with exorbitant bank fees.) You can do it in either of 
  81.  two ways. 
  82.  
  83.      Send a cheque, or equivalent, for $25 (Australian dollars) to 
  84.  
  85.            Peter Moylan 
  86.            91 Harriet Street 
  87.            Waratah, NSW 2298 
  88.            Australia 
  89.  
  90.      Transfer the amount of $25 (Australian dollars) to the following bank 
  91.       account. 
  92.  
  93.            Marion Gevers 
  94.            Account number (06 2831) 00626468 
  95.            Commonwealth Bank 
  96.            University of Newcastle, Australia 
  97.  
  98.  
  99. ΓòÉΓòÉΓòÉ 3. Documentation in other languages ΓòÉΓòÉΓòÉ
  100.  
  101. Documentation in other languages 
  102.  
  103. To simplify the distribution, the FtpServer zip file normally contains only 
  104. English-language documentation.  To get documentation in another language, go 
  105. to ftp://eepjm.newcastle.edu.au/inf and look for a file called 
  106. ftpserver.inf.xxx, where xxx indicates the language. If you want to volunteer 
  107. to do another translation, you will find the original document source 
  108. (FtpServer.IPF) in source.zip, which is included as part of the FtpServer 
  109. distribution. 
  110.  
  111. The copyright on the translations belongs to the people who did the 
  112. translations. 
  113.  
  114. The versions that are now available are 
  115.  
  116. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  117. ΓöéItaliano/Italian   Γöéftpserver.inf.it   ΓöéAndrea Brancatelli     Γöé
  118. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  119. ΓöéPyccku╨º/Russian    Γöéftpserver.inf.866  ΓöéKonstantin Boyandin    Γöé
  120. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  121.  
  122.  
  123. ΓòÉΓòÉΓòÉ 4. Server features ΓòÉΓòÉΓòÉ
  124.  
  125.  FtpServer is an ftp server program that implements most of the ftp standard, 
  126. RFC 959.  It supports re-get and passive mode transfers.  The system manager 
  127. can control which directories are visible to users, and the kind of access 
  128. (read, write, delete) allowed in each directory. 
  129.  
  130. For further details, see 
  131.  
  132.      What's special about FtpServer 
  133.      Limitations and missing features 
  134.      Quirks 
  135.      Troublesome clients 
  136.      Nonstandard features 
  137.  
  138.  
  139. ΓòÉΓòÉΓòÉ 4.1. What's special about FtpServer? ΓòÉΓòÉΓòÉ
  140.  
  141.      Supports essentially all of what's in the FTP standard, including re-get 
  142.       and passive mode. 
  143.  
  144.      Fast and compact. 
  145.  
  146.      Compatible with all FTP clients that I've been able to test. 
  147.  
  148.      Separate read, write, and delete permission for each directory the user 
  149.       can see.  You can also make directories invisible. Users can be given 
  150.       access to multiple drives or network drives, if desired. 
  151.  
  152.      The directories seen by a user can include symbolic links. 
  153.  
  154.      You can restrict the IP addresses from which clients can log in, and you 
  155.       can restrict the number of simultaneous logins from the same address. 
  156.  
  157.      Can be run from inetd. 
  158.  
  159.      Can be run detached. 
  160.  
  161.  
  162. ΓòÉΓòÉΓòÉ 4.2. Limitations and missing features ΓòÉΓòÉΓòÉ
  163.  
  164. LIMITATIONS AND MISSING FEATURES 
  165.  
  166. These are things I might fix up when I have the time, though some have higher 
  167. priority than others. 
  168.  
  169.      Transfer types: only Ascii, Image, and "Local 8" are supported. Support 
  170.       for Fortran carriage control and EBCDIC will probably never be added. 
  171.  
  172.      Page-structured files will probably never be supported. (As far as I 
  173.       know, only PDP-10 systems support this feature.) 
  174.  
  175.      The only supported transmission mode is stream mode.  I might or might 
  176.       not add support for block mode and compressed mode at a later stage.  For 
  177.       the moment, there doesn't seem to be any demand for these extras - I 
  178.       haven't come across any ftp client that uses them. 
  179.  
  180.  The only command from RFC 959 that is not implemented is STAT. 
  181.  
  182.  
  183. ΓòÉΓòÉΓòÉ 4.3. Quirks ΓòÉΓòÉΓòÉ
  184.  
  185. QUIRKS 
  186.  
  187. These might be seen as errors, but there's no need to fix them because they 
  188. don't have a harmful effect. 
  189.  
  190.      Can CD to a directory that doesn't exist, if that directory is shown as 
  191.       visible in the user's permission file.  Not a real problem, because the 
  192.       user sees an empty listing and can't do any operations in that directory. 
  193.  
  194.  
  195. ΓòÉΓòÉΓòÉ 4.4. Troublesome clients ΓòÉΓòÉΓòÉ
  196.  
  197. TROUBLESOME CLIENTS 
  198.  
  199. Different ftp clients work differently, and some of them don't bother to adhere 
  200. to the standards, so there will probably always be some client 
  201. incompatibilities.  The ones I know about so far are: 
  202.  
  203.    1. One of the MS-Windows ftp clients (for the moment I've forgotten which 
  204.       one) gives unreasonable time delays when listing a short directory, 
  205.       although long listings are quite fast.  The tests I've been able to do 
  206.       suggest that this problem occurs only when the client and server machines 
  207.       are physically close to each other.  Once the network delays rise to more 
  208.       typical values, the problem goes away. 
  209.  
  210.    2. I've been told of a problem when using ws-ftp, involving a "can't change 
  211.       directory" symptom when fetching the entire contents of a directory; but 
  212.       I've been unable to reproduce the problem and I'm still not quite sure of 
  213.       the precise nature of the problem. 
  214.  
  215.    3. Apparently some proxy servers can't handle multiline responses to FTP 
  216.       commands. If you hit this problem, you might be able to solve it by 
  217.       deleting the file WELCOME.MSG. 
  218.  
  219.  
  220. ΓòÉΓòÉΓòÉ 4.5. Non-standard features ΓòÉΓòÉΓòÉ
  221.  
  222. NON-STANDARD FEATURES 
  223.  
  224. The program violates RFC959 in the following ways: 
  225.  
  226.    1. Extra commands SIZE and MDTM are implemented. 
  227.  
  228.    2. The SYST command returns a reply of UNIX rather than OS/2. I had to do 
  229.       this because the "correct" reply causes WebExplorer to misinterpret the 
  230.       directory listings, and I'm told that at least one Microsoft ftp client 
  231.       will refuse to connect to a server that identifies itself as OS/2. 
  232.  
  233.    3. The obsolete and non-official commands XMKD, XRMD, XPWD, XCUP, and XCWD 
  234.       are implemented.  (These became obsolete more than 10 years ago, and most 
  235.       ftp clients don't use them; but apparently one of the clients for Windows 
  236.       NT hasn't yet been updated to the current standard.) 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 5. Installation ΓòÉΓòÉΓòÉ
  240.  
  241. Installation 
  242.  
  243. See also De-installation 
  244.  
  245. You should have received this package in the form of a zip file. To install it, 
  246. simply unzip the file into a directory of your choice. (Presumably you've 
  247. already done this.)  The server is now ready to run. 
  248.  
  249. The server itself is the program called ftpd.exe.  You can run it either by 
  250. double-clicking on the desktop icon, or by entering the command "ftpd" in a 
  251. command-line session.  (In the latter case, make sure you're in the right 
  252. directory, otherwise you'll end up running the ftpd that was supplied with 
  253. OS/2.)  Most people will want to put a program object or shadow for ftpd into 
  254. the startup folder, so that the server will run each time the system is booted; 
  255. but that's up to you. 
  256.  
  257. Even though the server will work "out of the box", you still need to define the 
  258. user permissions so that clients can connect to the server. You can do this 
  259. either before running the server, or while it's running.  See Setting up the 
  260. User Permissions. 
  261.  
  262. The file source.zip is optional.  If you're not interested in the source code, 
  263. you can delete it. 
  264.  
  265. For some other options, see 
  266.  
  267.      Command line parameters 
  268.      Running from inetd 
  269.      Running FtpServer detached 
  270.      Welcome messages 
  271.  
  272.  
  273. ΓòÉΓòÉΓòÉ 6. De-installation ΓòÉΓòÉΓòÉ
  274.  
  275. De-installation 
  276.  
  277. FtpServer does not tamper with CONFIG.SYS or with other system files. If you 
  278. decide that you don't want to keep FtpServer, simply delete the directory into 
  279. which you installed it. 
  280.  
  281.  
  282. ΓòÉΓòÉΓòÉ 7. Setting up the User Permissions ΓòÉΓòÉΓòÉ
  283.  
  284.  User Permissions 
  285.  
  286.      General concepts 
  287.      Setting up users with the PMSetup program 
  288.      Setting up users with the VIOSetup program 
  289.      Manual configuration 
  290.  
  291.  
  292. ΓòÉΓòÉΓòÉ 7.1. User permissions: General concepts ΓòÉΓòÉΓòÉ
  293.  
  294.  GENERAL CONCEPTS 
  295.  
  296. Each user of the server has a login name (username), a password, and a tree of 
  297. accessible directories.  Typically this tree consists of one home directory and 
  298. all of its subdirectories, but more complex arrangements are possible.  The 
  299. system manager may, by the use of symbolic links, allow the tree to cross 
  300. multiple drives or even multiple nodes on the local area network.  The system 
  301. manager may also allow access to a directory but block access to specified 
  302. subdirectories of that directory.  In all cases, a user is restricted to using 
  303. the directories that the system manager has specified for that user.  Users 
  304. cannot get at, or even see, any other directories in the machine's file system. 
  305. Furthermore, users are not told the true physical paths of those directories 
  306. that they are allowed to see. 
  307.  
  308. Note:  In this context, "user" refers to a username rather than to a person. 
  309. For example, you might have a number of different people all accessing the 
  310. server via the username "anonymous". As far as the server is concerned, they 
  311. are not separate users, but rather separate instances of the user called 
  312. "anonymous". 
  313.  
  314. The server looks up the user information in an INI file called FTPD.INI, which 
  315. should be in the same directory as ftpd.exe. This INI file is created and 
  316. maintained by the PMSetup or VIOSetup utility, as explained below. 
  317.  
  318. There are two ways to create and edit the user permissions. 
  319.  
  320.    1. By using the VIOSetup or PMSetup program that is supplied with FtpServer. 
  321.       (VIOSetup and PMSetup do the same job, except that one of them is a 
  322.       text-mode program and the other isn't.) This is the recommended method, 
  323.       for compatibility with future releases of FtpServer, and also because 
  324.       this method ensures that you produce syntactically correct permission 
  325.       data.  The procedure is described in the sections Using the PMSetup 
  326.       utility and Using the VIOSetup utility. 
  327.  
  328.    2. Manually, using any text editor.  The details can be found in the section 
  329.       Manual configuration.  Manual configuration is supported for the benefit 
  330.       of existing FtpServer users who have become used to doing it this way; 
  331.       but it is not the recommended method, because it's too easy to make 
  332.       mistakes. 
  333.  
  334.  User categories 
  335.  
  336.  Each user is classified as one of the following. 
  337.  
  338.    G       Guest user, who has to provide an e-mail address as a password. 
  339.  
  340.    U       Normal user, who has to supply a password 
  341.  
  342.    N       User who does not need a password. 
  343.  
  344.    M       Manager: same as U, except that a manager gets some extra 
  345.            privileges. 
  346.  
  347.  Normally you would create one "manager" account for yourself, and use the G or 
  348.  U categories for all other users.  The N category is for those rare cases 
  349.  where you don't need to control access with a password. 
  350.  
  351.  Directory permissions 
  352.  
  353.  Each directory that is accessible to the user is described by some combination 
  354.  of the following five permission attributes. 
  355.  
  356.    V       Directory visible.  This should be set in most cases.  When it's not 
  357.            set, the client can't do a "change directory" to this directory, and 
  358.            it won't appear in directory listings. 
  359.  
  360.    R       Read permission.  If this is set then the client can download files 
  361.            from this directory. 
  362.  
  363.    W       Write permission.  If this is set then the client can upload files 
  364.            to this directory. 
  365.  
  366.    D       Delete permission.  If this is set then the client can delete files 
  367.            from this directory.  Note: to overwrite an existing file, both W 
  368.            and D permissions are needed. 
  369.  
  370.    N       Rename permission.  If this is set then the client can rename files 
  371.            in this directory.  Note: if the rename results in moving a file to 
  372.            a different directory, then the N permission flag is no longer 
  373.            relevant.  In that case, the user needs a D permission for the 
  374.            source directory and a W permission for the destination directory. 
  375.  
  376.  Remark  It is possible for a user to be given read, write, delete, and/or 
  377.          rename privileges to an invisible directory.  In such cases the users 
  378.          can perform the permitted operations only if they know the correct 
  379.          file name, including the directory name, because they won't see the 
  380.          directory name in a directory listing. 
  381.  
  382.  It's also possible for an invisible directory to have visible subdirectories. 
  383.  Users can get to those directories only if they know the path name, including 
  384.  the name of the invisible directory. 
  385.  
  386.  Symbolic links 
  387.  
  388.  A symbolic link is a pointer to some other part of the machine's file system. 
  389.  You - the system manager - can insert symbolic links in any directory. From 
  390.  the user's point of view, a symbolic link looks like just another 
  391.  subdirectory. 
  392.  
  393.  A symbolic link has a name (which is what the user sees) and a physical path 
  394.  (which is known only to the system manager).  The physical path must be either 
  395.  a null string, or a full path name including the drive letter. 
  396.  
  397.  A symbolic link normally points to a directory, but it is also possible to 
  398.  create a symbolic link to a file that is not a directory. 
  399.  
  400.  Note that the user cannot see any difference between a symbolic link and an 
  401.  ordinary file or subdirectory name.  All that the user sees is a single 
  402.  directory tree that starts with a root node called "/". 
  403.  
  404.  Pseudo-directories 
  405.  
  406.  It is possible to specify a symbolic link whose physical path is unspecified. 
  407.  (That is, it is an empty string.)  This creates a pseudo-directory: something 
  408.  that ftp clients will see as a directory, but which does not correspond to any 
  409.  physical directory.  A pseudo-directory cannot hold any real files, but it can 
  410.  contain symbolic links. 
  411.  
  412.  The main use for a pseudo-directory is for the case where you want to give a 
  413.  user access to several unrelated directories, possibly on different drives. 
  414.  To do this, you make the user's top-level directory a pseudo-directory, and 
  415.  then put links in that directory to the directories that the user is allowed 
  416.  to see. 
  417.  
  418.  
  419. ΓòÉΓòÉΓòÉ 7.2. Manual configuration ΓòÉΓòÉΓòÉ
  420.  
  421.  Manual configuration of users 
  422.  
  423. This section describes how to edit a permission file.  It can be skipped by 
  424. most people, because in most cases it's better to use the PMSetup or VIOSetup 
  425. program to automate the editing. 
  426.  
  427. If the user information is already in the server's INI file (e.g. because you 
  428. used the PMSetup utility to add this user), then the first thing you need to do 
  429. is to use the StorePRM utility to create a PRM file for this user. (Of course 
  430. this step is not needed if you have an existing PRM file for the user.)  After 
  431. editing the PRM file, which you can do with any text editor, you can use the 
  432. LoadPRM utility to load the information back into the INI file. 
  433.  
  434. A PRM file is free-format, i.e. the exact formatting is not important; but, for 
  435. the sake of readability, I suggest that you use indentation etc. to make its 
  436. structure clearer. 
  437.  
  438. The file can include comments.  A comment is anything from the '%' sign to the 
  439. end of the current line.  Note, however, that comments will be stripped out 
  440. when the LoadPRM program loads the data into the server's INI file. 
  441.  
  442. File names containing spaces or special characters should be delimited by 
  443. either double quote marks ("...") or single quote marks ('...').  For "normal" 
  444. file names the quotation marks are optional.  (But see the warning later in 
  445. this page.) 
  446.  
  447. The first five things in a permission file are: 
  448.  
  449.    1. The user category code (G, U, N, M), as described in the General concepts 
  450.       section. 
  451.  
  452.    2. The password.  For a guest user, put "@" as the password. For an 'N' 
  453.       user, just supply a dummy entry here. 
  454.  
  455.    3. The user limit (a numeric value). 
  456.  
  457.    4. This user's speed limit (a numeric value). 
  458.  
  459.    5. The user's real name. 
  460.  
  461.  Next, you may have some notes - up to 2048 characters - starting with the 
  462.  character pair '(*' and finishing with '*)'.  If the strings (* and *) occur 
  463.  inside the notes, they must occur as properly nested matched pairs. 
  464.  
  465.  Finally you specify the directory information, in the format 
  466.  
  467.      <directory name> <directory descriptor> 
  468.  
  469.  where <directory name> specifies the user's root directory.  There are two 
  470.  possible ways to specify a <directory name>: 
  471.  
  472.      <namestring> 
  473.      <namestring> = <namestring> 
  474.  
  475.  where a <namestring> is any string of characters, optionally enclosed in 
  476.  quotation marks.  The first alternative - the one without the '=' sign - would 
  477.  not normally be used in specifying the root directory, but it is the normal 
  478.  form for specifying a subdirectory (see below). The second alternative 
  479.  specifies a symbolic link.  In that case the <namestring> before the '=' sign 
  480.  is the directory name as seen by the ftp client, and the <namestring> after 
  481.  the '=' sign is a full path name, starting with a drive letter. 
  482.  
  483.  At the root level, the directory name is not seen by the user in any case, and 
  484.  the full path name is very often a null string, in order to specify a 
  485.  pseudo-directory.  Thus, a very common form of specification for the 
  486.  root-level directory is simply 
  487.  
  488.      ""="" 
  489.  
  490.  A <directory descriptor> gives the permissions for this home directory and all 
  491.  of its subdirectories.  It has the form 
  492.  
  493.      <code> <subdirectory info> 
  494.  
  495.  Both of these are optional.  The <code> can be any combination of 
  496.  
  497.    V+      Directory visible 
  498.    V-      Directory invisible 
  499.    R+      Allow reads (i.e. downloads) of files in this directory 
  500.    R-      Deny read 
  501.    W+      Allow write 
  502.    W-      Deny write 
  503.    D+      Allow delete 
  504.    D-      Deny delete 
  505.    N+      Allow rename 
  506.    N-      Deny rename 
  507.  
  508.  The permission codes are always to be interpreted relative to the parent 
  509.  directory's permission code.  That is, a directory has the same permissions as 
  510.  its parent, unless explicitly changed by adding and/or deleting permissions. 
  511.  
  512.  (For the root directory, the default permissions are: visible, read, no write, 
  513.  no delete, no rename.) 
  514.  
  515.  The <subdirectory info> is defined recursively.  It has the form 
  516.  
  517.      (  <item> ,  <item> ,  ...  , <item> ) 
  518.  
  519.  i.e. it is a comma-separated list of items, surrounded by parentheses.  Each 
  520.  <item> has the form 
  521.  
  522.      <directory name>  <directory descriptor> 
  523.  
  524.  That is, it follows exactly the same rules as described above for the root 
  525.  directory.  The recursive nature of the rules means, of course, that the 
  526.  <directory descriptor> for any subdirectory may contain specifications of 
  527.  further subdirectories, down to any desired level. 
  528.  
  529.  If this sounds complicated, take a look at the supplied *.PRM files, and 
  530.  you'll soon pick up the pattern. 
  531.  
  532.  Note:  You don't have to list all of the subdirectories - only the ones whose 
  533.  permissions are different from the permissions of the parent directory. 
  534.  
  535.  Example 1 
  536.  
  537.  Suppose you want the user "anonymous" to have read access to the directory 
  538.  C:\users\pub; read and write access to C:\users\pub\upload; no access at all 
  539.  to C:\users\pub\private; and read access to all other subdirectories of 
  540.  C:\users\pub.  Then the permission file ANONYMOUS.PRM should have the 
  541.  following contents. 
  542.  
  543.       G                         % user category = guest
  544.       @                         % password = e-mail address
  545.       10                        % user limit
  546.       2000                      % speed limit
  547.       ""                        % no real name recorded
  548.       (*This is a guest account*)   % notes to store in INI file
  549.       pub="C:/users/pub/" V+R+  % user's root directory
  550.         ( upload W+,            % allow write access to upload directory
  551.           private V-R- )        % deny all access to private directory
  552.  
  553.  Example 2 
  554.  
  555.  Suppose you want the user "user1" to have read and write access to drive A:; 
  556.  read-only access to directory C:\users\pub and all of its subdirectories; read 
  557.  and write access to D:\abc and all of its subdirectories; and read and delete 
  558.  access to E:\Apps. To make the example more interesting, let us suppose that 
  559.  we want to make the directory on E: look like a subdirectory of D:\abc\def. 
  560.  You can do this by creating a permission file USER1.PRM with the following 
  561.  contents. 
  562.  
  563.       U                         % normal user
  564.       secret                    % password
  565.       2                         % user limit
  566.       6000                      % speed limit
  567.       "Bart MacHomer"           % real name
  568.       (*Created April 1999*)    % notes to store in INI file
  569.       ""="" W+                  % root directory is a pseudo-directory
  570.          ("A"="A:",
  571.           "pub"="C:/users/pub" W-,
  572.           "dir1"="D:/abc"
  573.             (def
  574.               ("apps"="E:/Apps" W-D+)
  575.             )
  576.          )
  577.  
  578.  Remark: FtpServer considers the forward slash (/) and backslash (\) to be 
  579.  equivalent in filename strings. 
  580.  
  581.  Warning about potential syntax errors 
  582.  
  583.  The software that parses a permission file tries to be as non-rigid as 
  584.  possible; for example, it does not insist that the characters in passwords, 
  585.  directory names, etc. be alphanumeric characters.  This flexibility comes at a 
  586.  price: you can write permission files that seem to be correct, but which are 
  587.  syntactically ambiguous. 
  588.  
  589.  To avoid problems, it is a good idea always to enclose directory and file 
  590.  names in quotation marks. 
  591.  
  592.  Converting from older formats 
  593.  
  594.  The rules for specifying directories, as described on this page, were 
  595.  introduced in version 0.71 of FtpServer.  For version 0.70 and earlier, the 
  596.  rules were slightly different.  Both the old and new formats will be supported 
  597.  in versions 0.71 up to 0.80, but after that the old format will no longer be 
  598.  accepted.  Thus, you should convert all your old PRM files to the new format. 
  599.  
  600.  The conversion can be done with the LoadPRM utility, which can read PRM files 
  601.  in either the old or new format but will store the data (in FTPD.INI) in the 
  602.  new format.  A quick way to convert all your PRM files into the new format is 
  603.  to execute the two commands 
  604.  
  605.           loadprm *
  606.           storeprm *
  607.  
  608.  Note that this will strip all comments out of the files.  If you want to keep 
  609.  the comments, you will have to do some manual editing. 
  610.  
  611.  
  612. ΓòÉΓòÉΓòÉ 7.3. Manager privileges ΓòÉΓòÉΓòÉ
  613.  
  614. Manager privileges 
  615.  
  616. A manager account is the same as a normal user account, except that a manager 
  617. has a few extra privileges. 
  618.  
  619.      Managers can see system and hidden files in directory listings; other 
  620.       users cannot. 
  621.  
  622.      Managers are allowed to use the SITE MNGR commands. 
  623.  
  624.  
  625. ΓòÉΓòÉΓòÉ 8. The PMSetup utility ΓòÉΓòÉΓòÉ
  626.  
  627. The PMSetup utility 
  628.  
  629. When you run PMSetup, you get a notebook that controls all of the configuration 
  630. details of FtpServer.  The parameter settings are stored in a file FTPD.INI. 
  631. The server reads its INI file as it starts up, so any changes you make will not 
  632. take effect until the next time you start the server. 
  633.  
  634. Exception: the user permissions are not read until a user attempts to log in. 
  635. You may therefore alter the user permissions while the server is running, and 
  636. the alterations will affect the next user to log in. 
  637.  
  638. The opening screen of PMSetup gives you a choice between local and remote 
  639. configuration.  (The remote case is described in a later section.) If you want 
  640. to bypass this choice, you can use the command 
  641.  
  642.          pmsetup -G
  643.  
  644. and this will skip the opening dialogue and continue as if you had pressed the 
  645. "GO" button.  In this case, the local/remote option remains as it was the last 
  646. time you ran PMSetup. 
  647.  
  648. The setup details are divided into four groups. 
  649.  
  650.      Basic 
  651.      Options 
  652.      Security 
  653.      Users 
  654.  
  655.  
  656. ΓòÉΓòÉΓòÉ 8.1. The basic server settings ΓòÉΓòÉΓòÉ
  657.  
  658. The basic server settings 
  659.  
  660. The first part of the "Basic" page controls the following parameters. 
  661.  
  662.  Port number 
  663.            This is the tcp port on which FtpServer listens for new connections. 
  664.            Unless you are doing something nonstandard (for example, running two 
  665.            ftp servers on the same machine) this should always be 21. 
  666.  
  667.  Maximum number of users 
  668.            This specifies how many clients will be allowed to use the server 
  669.            simultaneously. I usually set this to 10.  Higher values will, of 
  670.            course, increase the potential load on your processor. 
  671.  
  672.            Note: this is a global maximum.  You may also set this to a very 
  673.            high value, and then control the number of users on a per-username 
  674.            basis. 
  675.  
  676.  Maximum number of guest users 
  677.            This typically should be slightly less than the number specified for 
  678.            the maximum number of users, to reserve one or more login slots for 
  679.            the system manager and other non-guest users. 
  680.  
  681.  Free space threshold (MB) 
  682.            This specifies the amount of free space that must be available on a 
  683.            drive for uploads to be enabled.  If the free space, in megabytes, 
  684.            falls below this level then uploads will be disabled. 
  685.  
  686.  Timeout (seconds) 
  687.            The time that a client session may remain idle before the user is 
  688.            evicted. You will find that many ftp clients, especially web 
  689.            browsers, don't log out properly, so their sessions have to be 
  690.            killed with the timeout mechanism. 
  691.  
  692.  Transfer logging 
  693.  
  694.  You can ask the server to produce a user log (FTPUSERS.LOG) and/or a log in 
  695.  common log format (COMMON.LOG). (If you delete these files, they will be 
  696.  re-created.  It would be a good idea to delete them periodically, or move them 
  697.  to an archive, so that they do not grow too large.)  The user log produces a 
  698.  list of files that have been uploaded or downloaded.  The common log contains 
  699.  similar information, but in a format used by many http servers.  This allows 
  700.  you to use log analysis tools that have been designed for web servers. 
  701.  
  702.  You can select how much detail gets written to these two logs. 
  703.  
  704.  No transfer logging 
  705.            This effectively disables the transfer logging. 
  706.  
  707.  Log successful transfers 
  708.            The log includes entries for all uploads and downloads that 
  709.            completed successfully, but the operations that failed are not 
  710.            logged. 
  711.  
  712.  Log all file transfers 
  713.            With this option, you get log entries even for transfers that were 
  714.            aborted before they completed. 
  715.  
  716.  Log all clients 
  717.            This creates user log entries for all users, even those who didn't 
  718.            transfer any files. 
  719.  
  720.  Transaction logging 
  721.  
  722.  The transaction log is a much more detailed log.  You can choose to send it to 
  723.  the screen, or to a disk file, or both. The disk file is called FTPTRANS.LOG, 
  724.  and it is updated approximately once every 15 minutes if this feature is 
  725.  enabled. 
  726.  
  727.  Warning: Transaction logging can create very large log files.  I suggest that 
  728.  you don't enable transaction logging to a file unless you're trying to track 
  729.  down a problem. Logging to the screen, on the other hand, will give you some 
  730.  idea of how busy the server is. 
  731.  
  732.  
  733. ΓòÉΓòÉΓòÉ 8.2. Options ΓòÉΓòÉΓòÉ
  734.  
  735. Options 
  736.  
  737. In the present version, the only option on this page is a choice between 
  738. binding to all local interfaces, or binding to a specific IP address.  If you 
  739. choose the "specific address", you should enter an IP address in the standard 
  740. format (four decimal numbers, separated by dots). 
  741.  
  742. For most applications, the best choice is "all interfaces".  With this choice 
  743. the server listen for ftp requests on all your network interfaces, even if your 
  744. machine has multiple IP addresses. 
  745.  
  746. The "specific address" option is for the case where you have two or more IP 
  747. addresses, but you want the server to respond to only one of them.  In this 
  748. case you could, if you wished, run several independent ftp servers on the same 
  749. machine, each responding to a different address. 
  750.  
  751. (Another way to run several ftp servers is to make each one listen on a 
  752. different port.  That's a less attractive option, however, because most ftp 
  753. clients expect to find the server on the standard port 21.) 
  754.  
  755. If you do run multiple copies of ftpd.exe, put each of them in a different 
  756. directory.  This is because ftpd.exe expects to find its INI file in the same 
  757. directory as the executable, and for multiple copies you would want to have a 
  758. different INI file for each one. 
  759.  
  760.  
  761. ΓòÉΓòÉΓòÉ 8.3. Security settings ΓòÉΓòÉΓòÉ
  762.  
  763. Security settings 
  764.  
  765. The first item on the "Security" page is a field called "Max connections from 
  766. same address".  This specifies the maximum number of users that can be 
  767. connected simultaneously from the same IP address.  It is primarily a 
  768. protection against users who hog the server by logging in more than once.  I 
  769. usually set it to 2 or 3.  If you do not want this protection, set the number 
  770. to a very large value. 
  771.  
  772. Restricting access to certain IP addresses 
  773.  
  774. The large box on this page defines a filter for IP addresses.  This is for 
  775. putting restrictions on which remote hosts are allowed to log into the server. 
  776. (If you don't need this feature, just use a single "Allow all" entry.)  When a 
  777. client tries to connect, the server searches this list, starting at the 
  778. beginning, for the first entry that matches the client's IP address.  There 
  779. will always be a match, because the last entry is always an "everything else" 
  780. entry. The allow/refuse flag on the matching entry is used to decide whether 
  781. the client should be allowed to connect.  If the flag value is "refuse", the 
  782. connection attempt is rejected. 
  783.  
  784. Each list entry has an allow/refuse flag and two numeric components, an address 
  785. and a mask.  Each of these is expressed in "dotted quad" notation: a four-byte 
  786. value where each byte has its value written out in decimal. (This is a standard 
  787. convention for writing IP addresses.) A client address matches an entry if 
  788.  
  789.     (client IP address) AND mask = (IP address in the list) 
  790.  
  791. where AND means the bit-by-bit Boolean "logical AND" operation. 
  792.  
  793. Note, in particular, the two extreme cases: 
  794.  
  795.      If the mask is 255.255.255.255, then we are specifying an exact match 
  796.       between the client IP address and the address in the list. 
  797.  
  798.      If the mask were 0.0.0.0, then any IP address would match this entry. The 
  799.       last entry in the list is implicitly of this form, to specify an 
  800.       "everything else" condition. 
  801.  
  802.  Example 1. If you want to lock out all machines with IP address in the range 
  803.  123.45.67.0 to 123.45.67.127, your list would look like this. 
  804.  
  805.       Refuse  123.45.67.0  255.255.255.128 
  806.       Allow   all others 
  807.  
  808.  Example 2. Suppose you want to give access only to your local network, which 
  809.  has addresses in the range 123.45.66.0 to 123.45.67.255.  You can do this as 
  810.  follows. 
  811.  
  812.       Allow   123.45.66.0  255.255.254.0 
  813.       Refuse  all others 
  814.  
  815.  Example 3. To allow access to 123.45.67.89, but to lock out everyone else in 
  816.  123.45.67.*, you can use the rules 
  817.  
  818.       Allow   123.45.67.89  255.255.255.255 
  819.       Refuse  123.45.67.0   255.255.255.0 
  820.       Allow   all others 
  821.  
  822.  Notice that the list always finishes with an "all others" entry.  The PMSetup 
  823.  program will allow you to change the allow/refuse flag on this final entry, 
  824.  but it will not allow you to delete it. 
  825.  
  826.  
  827. ΓòÉΓòÉΓòÉ 8.4. Adding and removing users ΓòÉΓòÉΓòÉ
  828.  
  829. Adding and removing users 
  830.  
  831. The "Users" page controls who is allowed to log in to the server. 
  832.  
  833. Deleting a user 
  834.  
  835. Select the entry you want to delete, then click on the "Delete" button. 
  836.  
  837. Adding a new user 
  838.  
  839. Click on the "Add" button, and then proceed as for Editing a user's 
  840. permissions. 
  841.  
  842. Cloning an existing user 
  843.  
  844. First select the user whose details you want to duplicate, then click on the 
  845. "Clone" button, and then proceed as for Editing a user's permissions. This is 
  846. the same as adding a new user, except that the new user's attributes are copied 
  847. from those for an existing user. 
  848.  
  849. Editing the permissions of an existing user 
  850.  
  851. Select the user name, click on the "Edit" button, and then follow the 
  852. instructions in the section Editing a user's permissions. Alternatively, just 
  853. double-click on the user name. 
  854.  
  855.  
  856. ΓòÉΓòÉΓòÉ 8.5. Editing a user's permissions ΓòÉΓòÉΓòÉ
  857.  
  858. Editing a user's permissions 
  859.  
  860. You get to this point by running the PMSetup program and choosing any of the 
  861. options (except "Delete") on the "Users" notebook page. 
  862.  
  863. The first item in the resulting dialogue is a client category - NoPassword, 
  864. Guest, User, or Manager.  The categories are explained in the General concepts 
  865. section. 
  866.  
  867. Below this you have several entry fields. 
  868.  
  869.    Speed limit 
  870.            An approximate upper bound on the file transfer speed for this user, 
  871.            in case you want to restrict how much of the processor power this 
  872.            user can get.  If you don't want such a control, just make this a 
  873.            large number. 
  874.  
  875.    User limit 
  876.            The maximum number of simultaneous sessions with this user name. (If 
  877.            you don't want such a control, just make this number larger than the 
  878.            global user limit.) 
  879.  
  880.    Real name 
  881.            This field is purely for your own records.  It is not used by 
  882.            FtpServer. 
  883.  
  884.    Username 
  885.            The name that the user will use when logging in. 
  886.  
  887.    Password 
  888.            This user's password.  Note that this entry field is disabled if the 
  889.            user category is "NoPassword" or "Guest". 
  890.  
  891.    Notes 
  892.            Use this for any purpose you wish. 
  893.  
  894.  Warning: If you change the user name, the permissions for the previous user 
  895.  name will be deleted.  You should also avoid using a user name that is the 
  896.  same as for some other user. 
  897.  
  898.  The small window near the bottom of this dialogue gives a summary - but not a 
  899.  complete description - of the top level of this user's directory tree.  To see 
  900.  the complete details, and to modify those details, click on the "Edit 
  901.  directories" button or double-click on the summary window. 
  902.  
  903.  Instructions for modifying the user's tree are on the next page of this 
  904.  document. 
  905.  
  906.  Note that none of your changes will be stored until you have confirmed them 
  907.  with the "OK" button.  To leave this dialogue without making any changes, use 
  908.  the "Cancel" button. 
  909.  
  910.  Converting from older formats 
  911.  
  912.  Some details of the format of user information in FTPD.INI were changed in 
  913.  version 0.71 of FtpServer.  Both the old and new formats are supported in 
  914.  versions 0.71 up to 0.80, but support for the old format is gradually being 
  915.  withdrawn.  Thus, you should convert all your user permission data to the new 
  916.  format. 
  917.  
  918.  The PMSetup program will automatically perform the conversion each time you 
  919.  edit a user.  If you have a small number of users defined, then the way to do 
  920.  the conversion is to run PMSetup and edit each user (without necessarily 
  921.  making any changes). 
  922.  
  923.  If you have a large number of users, it is easier to use the LoadPRM program 
  924.  to do the conversion.  This can be done with the following sequence of 
  925.  commands. 
  926.  
  927.           storeprm *
  928.           loadprm *
  929.           del *.prm
  930.  
  931.  (The final deletion can be omitted if you prefer to keep a copy of the PRM 
  932.  files.  If ever your INI file is damaged or destroyed, you can use the LoadPRM 
  933.  utility to re-load user data from PRM files.) 
  934.  
  935.  
  936. ΓòÉΓòÉΓòÉ 8.6. Editing a directory tree ΓòÉΓòÉΓòÉ
  937.  
  938. Editing a directory tree 
  939.  
  940. You get to this point while editing a user's permissions. The picture that is 
  941. shown on the screen is a representation of the directory tree for this user. 
  942. Initially it will show enough subtrees to reveal all symbolic links, and all 
  943. entries for which the user's permissions are different from the parent node's 
  944. permissions.  (For a new user, there will be nothing except an empty root 
  945. node.)  In the course of editing this tree you can expand or collapse nodes to 
  946. control how much detail is shown on the screen. 
  947.  
  948. The top of the screen shows both a physical path and a virtual path for the 
  949. current entry.  The physical path is the true location of the file or directory 
  950. on your disk.  The virtual path is the path as the client sees it. 
  951.  
  952. Each entry describes one directory or file.  At the left of each line, you will 
  953. see a code consisting of one or more of the letters "VRWDN". The meanings of 
  954. these user permission codes are explained in the General concepts section. 
  955.  
  956. To the right of the VRWDN code, some entries have one or more of the following 
  957. codes. 
  958.  
  959.    +       This directory is collapsed, i.e. its subdirectories (if any) are 
  960.            not at present displayed on the screen. 
  961.  
  962.    *       This entry is a symbolic link or pseudo-directory. 
  963.  
  964.    #       This entry describes a file rather than a directory. 
  965.  
  966.    ?       There is no file or directory on the disk that matches this entry. 
  967.            This might mean that you have made an error in the name; 
  968.            alternatively, it might mean that you are specifying a directory or 
  969.            file that you haven't yet created. 
  970.  
  971.  To edit the tree, you have the following options. 
  972.  
  973.      You can navigate through the list of directories with mouse clicks, with 
  974.       the cursor up/down keys, and also with the Home, End, PageUp, and 
  975.       PageDown keys. 
  976.  
  977.      To change a permission, type one of the characters V, R, W, D, or N, or 
  978.       click on the buttons with these labels. This toggles the state of the 
  979.       corresponding permission code for the currently selected directory. 
  980.  
  981.      The "-" key or button collapses a directory by removing its 
  982.       subdirectories from the screen listing. (The subdirectories are still 
  983.       there, and are still affected by things like the "Propagate" option. 
  984.       They simply aren't shown on the screen.) To get the subdirectories back, 
  985.       type the "+" key or button. 
  986.  
  987.      The "Add child" button adds a new child node under the current node. 
  988.  
  989.      The "Edit" button allows you to edit the details for the current entry. 
  990.       (Instructions for doing this are given later in this page.)  You can also 
  991.       edit by double-clicking on the entry. This option is disabled if the 
  992.       current entry describes a file or directory that is physically present on 
  993.       the disk. 
  994.  
  995.      The "Delete" button deletes the current node and all of its subtrees. 
  996.       This option is disabled if the current entry describes a file or 
  997.       directory that is physically present on the disk. 
  998.  
  999.      The "Inherit" button gives the selected entry a copy of the current 
  1000.       permissions of its parent. 
  1001.  
  1002.      The "Propagate" button copies the permissions of the currently selected 
  1003.       directory to all of its subdirectories. Use this if you want to change an 
  1004.       entire subtree in one operation. 
  1005.  
  1006.  When you've finished editing the permissions, click on the "Done" button to go 
  1007.  back to the previous dialogue.  If you've made a mistake, you still have the 
  1008.  option of using the "Cancel" button on that previous dialogue. 
  1009.  
  1010.  Modifying the details for one entry 
  1011.  
  1012.  The "Edit" and "Add child" options will bring up a screen window that 
  1013.  describes one tree node. The radio buttons at the top let you specify one of 
  1014.  three kinds of node. 
  1015.  
  1016.    subdirectory or file 
  1017.            This refers to a subdirectory or file that is contained within the 
  1018.            parent directory.  The "Name" field gives the name of the 
  1019.            subdirectory or file. Note that you cannot choose this option for 
  1020.            the top-level directory, because the top-level directory has no 
  1021.            parent. 
  1022.  
  1023.    link 
  1024.            This creates a symbolic link.  In the "Name" field, put a name of 
  1025.            your own choice; this will be the name of the directory as seen by 
  1026.            the client.  In the "Path" field, put the full physical path 
  1027.            (including drive letter) for this directory or file. 
  1028.  
  1029.    pseudo-directory 
  1030.            This is a special case of a link, where there is no physical path. A 
  1031.            pseudo-directory should contain only links and other 
  1032.            pseudo-directories. 
  1033.  
  1034.  Setting permissions for individual files 
  1035.  
  1036.  The access permissions used by FtpServer are normally given to directories, 
  1037.  and the permissions for a directory apply to all non-directory files in that 
  1038.  directory.  However, PMSetup will let you define an entry for a non-directory 
  1039.  file, and give it access permissions.  (It would be tedious to do this for 
  1040.  every file, but this feature can be used for special cases.)  This gives you a 
  1041.  method for making the permissions for a file different from the permissions of 
  1042.  the directory that it is in. 
  1043.  
  1044.  If you create a link or pseudo-directory with the same name as a real file or 
  1045.  subdirectory, your link will take precedence over the real name. In effect, 
  1046.  the real file or subdirectory will become invisible as far as the user is 
  1047.  concerned. 
  1048.  
  1049.  
  1050. ΓòÉΓòÉΓòÉ 9. Remote configuration ΓòÉΓòÉΓòÉ
  1051.  
  1052. PMSetup also offers the option of remote setup.  That is, you can run PMSetup 
  1053. on one computer and use it to configure a copy of FtpServer that is installed 
  1054. on a different computer.  To do this, you have to have the freeware utility 
  1055. INIServe running on the same computer as FtpServer.  You can find INIServe at 
  1056. http://eepjm.newcastle.edu.au/os2. 
  1057.  
  1058. If you select the "Remote" radio button after starting PMSetup, a "Setup" 
  1059. pushbutton is enabled.  Clicking on this gives you four fields to fill in: 
  1060.  
  1061.    Hostname 
  1062.            The name (or IP address) of the machine on which FtpServer is 
  1063.            running. 
  1064.  
  1065.    INIServe port 
  1066.            The TCP port that INIServe has been configured to listen on.  The 
  1067.            default value is 8000. 
  1068.  
  1069.    INIServe password 
  1070.            The password needed to log in to your copy of INIServe. 
  1071.  
  1072.    FtpServer directory 
  1073.            The full path name of the directory, on the remote machine, where 
  1074.            FtpServer is installed. 
  1075.  
  1076.  When you close the Setup window, you can click on the "GO" button to connect 
  1077.  to the remote machine.  If this gives a "failed to connect" or similar error 
  1078.  message, it probably means that you don't have INIServe running on the remote 
  1079.  machine, or that you've done something like specifying an incorrect port 
  1080.  number. 
  1081.  
  1082.  Once the connection is made, the operation is the same as for the case of 
  1083.  local configuration. 
  1084.  
  1085.  
  1086. ΓòÉΓòÉΓòÉ 10. The VIOSetup utility ΓòÉΓòÉΓòÉ
  1087.  
  1088. The VIOSetup utility 
  1089.  
  1090. The program VIOSETUP.EXE has three functions: 
  1091.  
  1092.      To set the parameters that the server will use when it starts up. 
  1093.      To place controls on which IP addresses may access the server. 
  1094.      To create and edit user permissions. 
  1095.  
  1096.  Use the F4 and F5 function keys on the keyboard to toggle among these 
  1097.  functions. 
  1098.  
  1099.  The parameter settings are stored in a file FTPD.INI.  The server reads its 
  1100.  INI file as it starts up, so any changes you make will not take effect until 
  1101.  the next time you start the server. 
  1102.  
  1103.  Exception: the user permissions are not read until a user attempts to log in. 
  1104.  You may therefore alter the user permissions while the server is running, and 
  1105.  the alterations will affect the next user to log in. 
  1106.  
  1107.  Now read 
  1108.  
  1109.      Setting the server parameters 
  1110.      Security settings 
  1111.      More setup options 
  1112.      Modifying user permissions 
  1113.  
  1114.  
  1115. ΓòÉΓòÉΓòÉ 10.1. Setting the server parameters ΓòÉΓòÉΓòÉ
  1116.  
  1117. Setting the server parameters 
  1118.  
  1119. When you run VIOSETUP.EXE, you get a screen showing the following items. 
  1120.  
  1121.  Server port 
  1122.            Unless you are doing something nonstandard (for example, running two 
  1123.            ftp servers on the same machine) this should always be 21. 
  1124.  
  1125.  Maximum number of users 
  1126.            This specifies how many clients will be allowed to use the server 
  1127.            simultaneously. I usually set this to 10.  Higher values will, of 
  1128.            course, increase the load on your processor. 
  1129.  
  1130.            Note: this is a global maximum.  You may also set this to a high 
  1131.            value, and then control the number of users on a per-username basis. 
  1132.  
  1133.  Maximum number of guest users 
  1134.            This typically should be slightly less than the number specified for 
  1135.            the maximum number of users, to reserve one or more login slots for 
  1136.            the system manager and other non-guest users. 
  1137.  
  1138.  Free space threshold (MB) 
  1139.            This specifies the amount of free space that must be available on a 
  1140.            drive for uploads to be enabled.  If the free space, in megabytes, 
  1141.            falls below this level then uploads will be disabled. 
  1142.  
  1143.  Timeout (seconds) 
  1144.            The time that a client session may remain idle before the user is 
  1145.            evicted. You will find that many ftp clients, especially web 
  1146.            browsers, don't log out properly, so their sessions have to be 
  1147.            killed with the timeout mechanism. 
  1148.  
  1149.  Transfer log format 
  1150.            In addition to the detailed transaction log, you can ask the server 
  1151.            to produce a user log (FTPUSERS.LOG) and/or a log in common log 
  1152.            format (COMMON.LOG). (If you delete these files, they will be 
  1153.            re-created.  It would be a good idea to delete them periodically, or 
  1154.            move them to an archive, so that they do not grow too large.)  The 
  1155.            user log produces a list of files that have been uploaded or 
  1156.            downloaded.  The common log contains similar information, but in a 
  1157.            format used by many http servers.  This allows you to use log 
  1158.            analysis tools that have been designed for web servers. 
  1159.  
  1160.  Transfer logging level 
  1161.            The logging level controls how much detail gets written to the user 
  1162.            log. 
  1163.  
  1164.               0           No logging 
  1165.  
  1166.               1           Log successful file transfers 
  1167.  
  1168.               2           Log successful and unsuccessful file transfers 
  1169.  
  1170.               3           Log all users, even those who didn't transfer any 
  1171.                           files 
  1172.  
  1173.  Transaction logging 
  1174.            The transaction log is a much more detailed log.  You can choose to 
  1175.            send it to the screen, or to a disk file, or both. The disk file is 
  1176.            called FTPTRANS.LOG, and it is updated approximately once every 15 
  1177.            minutes if this feature is enabled. 
  1178.  
  1179.            Warning: Transaction logging can create very large log files.  I 
  1180.            suggest that you don't enable this feature unless you're trying to 
  1181.            track down a problem. 
  1182.  
  1183.  To modify any of these parameters, use the up/down arrow keys to get to the 
  1184.  desired item, then type in the new value.  (The backspace, Insert, Delete, 
  1185.  Home, and End keys will also work during editing.)  The new value is accepted 
  1186.  when you type the Enter key, or when you use the function keys to go to 
  1187.  another field. 
  1188.  
  1189.  When you've finished editing, use the Esc key to exit from the VIOSetup 
  1190.  program, or type F5 to get to the security screen. 
  1191.  
  1192.  
  1193. ΓòÉΓòÉΓòÉ 10.2. Security settings ΓòÉΓòÉΓòÉ
  1194.  
  1195. Security settings 
  1196.  
  1197. To modify the security settings, run VIOSETUP.EXE, and then type the F5 
  1198. function key on the keyboard to get to the "Security" screen page. 
  1199.  
  1200. At the top of this page there is a field called the "Same IP limit".  This 
  1201. specifies the maximum number of users that can be connected simultaneously from 
  1202. the same IP address.  It is primarily a protection against users who hog the 
  1203. server by logging in more than once. 
  1204.  
  1205. Set this value to whatever you want, finishing with the "Enter" or "cursor 
  1206. down" key to confirm the new value.  The "cursor down" key will take you to the 
  1207. IP address controls, as described below.  When you've finished setting the 
  1208. values on this page, type F5 to get to more setup options. 
  1209.  
  1210. Restricting access to certain IP addresses 
  1211.  
  1212. The large box on this screen page defines a filter for IP addresses.  This is 
  1213. for putting restrictions on which remote hosts are allowed to log into the 
  1214. server. (If you don't need this feature, just use a single "Allow all" entry.) 
  1215. When a client tries to connect, the server searches this list, starting at the 
  1216. beginning, for the first entry that matches the client's IP address.  There 
  1217. will always be a match, because the last entry is always an "everything else" 
  1218. entry. The allow/refuse flag on the matching entry is used to decide whether 
  1219. the client should be allowed to connect.  If the flag value is "refuse", the 
  1220. connection attempt is rejected. 
  1221.  
  1222. Each list entry has an allow/refuse flag and two numeric components, an address 
  1223. and a mask.  Each of these is expressed in "dotted quad" notation: a four-byte 
  1224. value where each byte has its value written out in decimal. (This is a standard 
  1225. convention for writing IP addresses.) A client address matches an entry if 
  1226.  
  1227.     (client IP address) AND mask = (IP address in the list) 
  1228.  
  1229. where AND means the bit-by-bit Boolean "logical AND" operation. 
  1230.  
  1231. Note, in particular, the two extreme cases: 
  1232.  
  1233.      If the mask is 255.255.255.255, then we are specifying an exact match 
  1234.       between the client IP address and the address in the list. 
  1235.  
  1236.      If the mask is 0.0.0.0, then any IP address will match this entry. You 
  1237.       can use this to specify an "everything else" condition. 
  1238.  
  1239.  Example 1. If you want to lock out all machines with IP address in the range 
  1240.  123.45.67.0 to 123.45.67.127, your list would look like this. 
  1241.  
  1242.       Refuse  123.45.67.0  255.255.255.128 
  1243.       Allow   all others 
  1244.  
  1245.  Example 2. Suppose you want to give access only to your local network, which 
  1246.  has addresses in the range 123.45.66.0 to 123.45.67.255.  You can do this as 
  1247.  follows. 
  1248.  
  1249.       Allow   123.45.66.0  255.255.254.0 
  1250.       Refuse  all others 
  1251.  
  1252.  Example 3. To allow access to 123.45.67.89, but to lock out everyone else in 
  1253.  123.45.67.*, you can use the rules 
  1254.  
  1255.       Allow   123.45.67.89  255.255.255.255 
  1256.       Refuse  123.45.67.0   255.255.255.0 
  1257.       Allow   all others 
  1258.  
  1259.  Notice that the list always finishes with an "all others" entry.  The VIOSetup 
  1260.  program will allow you to change the allow/refuse flag on this final entry, 
  1261.  but it will not allow you to delete it. 
  1262.  
  1263.  
  1264. ΓòÉΓòÉΓòÉ 10.3. More setup options ΓòÉΓòÉΓòÉ
  1265.  
  1266. More setup options 
  1267.  
  1268. In the present version, the only option on this page is a choice between 
  1269. binding to all interfaces, or binding to a specific IP address.  Use the cursor 
  1270. left/right keys to highlight the option you want.  If you highlight "specific 
  1271. address", you will be given the opportunity to edit the address. After editing 
  1272. it, use the Enter key or a cursor up/down key to confirm that you've finished 
  1273. editing.  When you've finished setting the values on this page, type F5 to get 
  1274. to the user permission editor. 
  1275.  
  1276. For most applications, the best choice is "all interfaces".  With this choice 
  1277. the server listen for ftp requests on all your network interfaces, even if your 
  1278. machine has multiple IP addresses. 
  1279.  
  1280. The "specific address" option is for the case where you have two or more IP 
  1281. addresses, but you want the server to respond to only one of them.  In this 
  1282. case you could, if you wished, run several independent ftp servers on the same 
  1283. machine, each responding to a different address. 
  1284.  
  1285. (Another way to run several ftp servers is to make each one listen on a 
  1286. different port.  That's a less attractive option, however, because most ftp 
  1287. clients expect to find the server on the standard port 21.) 
  1288.  
  1289. If you do run multiple copies of ftpd.exe, put each of them in a different 
  1290. directory.  This is because ftpd.exe expects to find its INI file in the same 
  1291. directory as the executable, and for multiple copies you would want to have a 
  1292. different INI file for each one. 
  1293.  
  1294.  
  1295. ΓòÉΓòÉΓòÉ 10.4. Modifying user permissions ΓòÉΓòÉΓòÉ
  1296.  
  1297. Modifying user permissions 
  1298.  
  1299. To modify the user permissions, run VIOSETUP.EXE, and then type the F4 function 
  1300. key - or type F5 twice - to get to the "Users" screen page.  This will give you 
  1301. a list of all existing users.  The first time you run the program, the list 
  1302. will probably be empty. 
  1303.  
  1304. From this screen, you can add, delete, or modify users.  When you've finished, 
  1305. use the F4 or F5 function key to get to the other setup screens, or type X to 
  1306. exit from the VIOSetup program. 
  1307.  
  1308. Deleting a user 
  1309.  
  1310. Use the up/down arrow keys to get to the user you want to delete, and type the 
  1311. Del (delete) key. 
  1312.  
  1313. Adding a new user 
  1314.  
  1315. Type A, and then proceed as for Editing a user's permissions. 
  1316.  
  1317. Cloning an existing user 
  1318.  
  1319. Type C, and then proceed as for Editing a user's permissions. This is the same 
  1320. as adding a new user, except that the new user's attributes are copied from 
  1321. those for the user that was selected when the C command was typed. 
  1322.  
  1323. Editing the permissions of an existing user 
  1324.  
  1325. Type E, and then follow the instructions in the section Editing a user's 
  1326. permissions. 
  1327.  
  1328.  
  1329. ΓòÉΓòÉΓòÉ 10.5. Editing a user's permissions ΓòÉΓòÉΓòÉ
  1330.  
  1331. Editing a user's permissions 
  1332.  
  1333. You get to this point by running the VIOSetup program, typing F4 or F5 to get 
  1334. to the user editor, and then using one of the "A" (add user) or "E" (edit user) 
  1335. options. 
  1336.  
  1337. By now you should have six fields near the top of the screen. 
  1338.  
  1339.    User name 
  1340.            The name that the user will use when logging in. 
  1341.  
  1342.    Real name 
  1343.            This field is not used by FtpServer; it is purely for your own 
  1344.            records. 
  1345.  
  1346.    Category 
  1347.            One of User, Guest, NoPassword, or Manager. 
  1348.  
  1349.    Password 
  1350.            This user's password. 
  1351.  
  1352.    User limit 
  1353.            The maximum number of simultaneous sessions with this user name. (If 
  1354.            you don't want such a control, just make this number larger than the 
  1355.            global user limit.) 
  1356.  
  1357.    Speed limit 
  1358.            An approximate upper bound on the file transfer speed for this user, 
  1359.            in case you want to restrict how much of the processor power this 
  1360.            user can get.  If you don't want such a control, just make this a 
  1361.            large number. 
  1362.  
  1363.  Use the up/down arrow keys to get to the field you want to edit, and then 
  1364.  modify it as necessary.  For the "Category" field, use the left/right arrow 
  1365.  keys to select a category. 
  1366.  
  1367.  Warning: If you change the user name, the permissions for the previous user 
  1368.  name will be deleted.  You should also avoid using a user name that is the 
  1369.  same as for some other user. 
  1370.  
  1371.  The bottom half of this screen gives a summary - but not a complete 
  1372.  description - of the top level of this user's directory tree.  To see the 
  1373.  complete details, and to modify those details, use the "cursor down" key to 
  1374.  move to this part of the screen. 
  1375.  
  1376.  Instructions for modifying the user's tree are on the next page of this 
  1377.  document. 
  1378.  
  1379.  Converting from older formats 
  1380.  
  1381.  Some details of the format of user information in FTPD.INI were changed in 
  1382.  version 0.71 of FtpServer.  Both the old and new formats are supported in 
  1383.  versions 0.71 up to 0.80, but in later versions the old format will probably 
  1384.  no longer be accepted.  Thus, you should convert all your user permission data 
  1385.  to the new format. 
  1386.  
  1387.  The VIOSetup program will automatically perform the conversion each time you 
  1388.  edit a user.  If you have a small number of users defined, then the way to do 
  1389.  the conversion is to run VIOSetup and edit each user (without necessarily 
  1390.  making any changes). 
  1391.  
  1392.  If you have a large number of users, it is easier to use the LoadPRM program 
  1393.  to do the conversion.  This can be done with the following sequence of 
  1394.  commands. 
  1395.  
  1396.           storeprm *
  1397.           loadprm *
  1398.           del *.prm
  1399.  
  1400.  (The final deletion can be omitted if you prefer to keep a copy of the PRM 
  1401.  files.  If ever your INI file is damaged or destroyed, you can use the LoadPRM 
  1402.  utility to re-load user data from PRM files.) 
  1403.  
  1404.  
  1405. ΓòÉΓòÉΓòÉ 10.6. Editing a directory tree ΓòÉΓòÉΓòÉ
  1406.  
  1407. Editing a directory tree 
  1408.  
  1409. You get to this point while editing a user's permissions. The picture that is 
  1410. shown on the screen is a representation of the directory tree for this user. 
  1411. Initially it will show enough subtrees to reveal all symbolic links, and all 
  1412. entries for which the user's permissions are different from the parent node's 
  1413. permissions.  (For a new user, there will be nothing except an empty root 
  1414. node.)  In the course of editing this tree you can expand or collapse nodes to 
  1415. control how much detail is shown on the screen. 
  1416.  
  1417. The top of the screen shows both a physical path and a virtual path for the 
  1418. current entry.  The physical path is the true location of the file or directory 
  1419. on your disk.  The virtual path is the path as the client sees it. 
  1420.  
  1421. Each entry describes one directory or file.  At the left of each line, you will 
  1422. see a code consisting of one or more of the letters "VRWDN". The meanings of 
  1423. these user permission codes are explained in the General concepts section. 
  1424.  
  1425. To the right of the VRWDN code, some entries have one or more of the following 
  1426. codes. 
  1427.  
  1428.    +       This directory is collapsed, i.e. its subdirectories (if any) are 
  1429.            not at present displayed on the screen. 
  1430.  
  1431.    *       This entry is a symbolic link. 
  1432.  
  1433.    #       This entry describes a file rather than a directory. 
  1434.  
  1435.    ?       There is no file or directory on the disk that matches this entry. 
  1436.            This might mean that you have made an error in the name; 
  1437.            alternatively, it might mean that you are specifying a directory or 
  1438.            file that you haven't yet created. 
  1439.  
  1440.  To edit the tree, you have the following options. 
  1441.  
  1442.      You can navigate through the list of directories with the cursor up/down 
  1443.       keys, and also with the Home, End, PageUp, and PageDown keys. 
  1444.  
  1445.      To change a permission, type one of the characters V, R, W, or D. This 
  1446.       toggles the state of the corresponding permission code for the currently 
  1447.       selected directory. 
  1448.  
  1449.      Typing the "I" key gives the selected entry a copy of the current 
  1450.       permissions of its parent. 
  1451.  
  1452.      The "P" key copies the permissions of the currently selected directory to 
  1453.       all of its subdirectories. Use this if you want to change an entire 
  1454.       subtree in one operation. 
  1455.  
  1456.      The "-" key collapses a directory by removing its subdirectories from the 
  1457.       screen listing. (But these subdirectories will still be affected by the 
  1458.       "P" option.) To get the subdirectories back, type the "+" key. 
  1459.  
  1460.      The "A" key adds a new child node under the current node. 
  1461.  
  1462.      The "Del" key deletes the current node and all of its subtrees. This 
  1463.       option is disabled if the current entry describes a file or directory 
  1464.       that is physically present on the disk. 
  1465.  
  1466.      The "E" key allows you to edit the details for the current entry. 
  1467.       (Instructions for doing this are given later in this page.) This option 
  1468.       is disabled if the current entry describes a file or directory that is 
  1469.       physically present on the disk. 
  1470.  
  1471.  When you've finished editing the permissions, type B to go back to the 
  1472.  previous screen, or X to exit completely from VIOSetup. 
  1473.  
  1474.  Modifying the details for one entry 
  1475.  
  1476.  The "E" or "A" command will bring up a screen window with three details that 
  1477.  you can modify.  Use the cursor up/down keys to go from one field to another. 
  1478.  
  1479.    1. The Name field gives the subdirectory or file name. 
  1480.  
  1481.    2. The Link field should have value "no" for an ordinary subdirectory or 
  1482.       file, and "yes" for a symbolic link.  Use the cursor left/right keys to 
  1483.       change the value of this field. 
  1484.  
  1485.    3. The Path is the physical path (including drive letter) for this directory 
  1486.       or file.  You can modify this only if the Link field is set to "yes".  If 
  1487.       you leave the Path blank, you are defining a pseudo-directory. 
  1488.  
  1489.  When you have finished editing these details, type the Esc key to return to 
  1490.  the tree. 
  1491.  
  1492.  Setting permissions for individual files 
  1493.  
  1494.  The access permissions used by FtpServer are normally given to directories, 
  1495.  and the permissions for a directory apply to all non-directory files in that 
  1496.  directory.  However, VIOSetup will let you define an entry for a non-directory 
  1497.  file, and give it access permissions.  (It would be tedious to do this for 
  1498.  every file, but this feature can be used for special cases.)  This gives you a 
  1499.  method for making the permissions for a file different from the permissions of 
  1500.  the directory that it is in. 
  1501.  
  1502.  
  1503. ΓòÉΓòÉΓòÉ 11. Running the server ΓòÉΓòÉΓòÉ
  1504.  
  1505. Running the server 
  1506.  
  1507. The server executable is called FTPD.EXE.  You can run this the way you run any 
  1508. other OS/2 program: from the command-line, by clicking on an icon, from the 
  1509. Startup folder, etc.  If you're running several server applications, then the 
  1510. most obvious choice is to put a command to start the server in the command file 
  1511. \TCPIP\BIN\TCPSTART.CMD. 
  1512.  
  1513. Normally the server takes its configurable parameters from the INI file created 
  1514. by the setup program.  You may, however, override these parameters by 
  1515. specifying command-line parameters. 
  1516.  
  1517. You also have the options of running the server from inetd or running the 
  1518. server as a detached program. 
  1519.  
  1520. Once the server is running, two keyboard commands are available. 
  1521.  
  1522.    G       Gradual shutdown.  No new users are accepted.  The program will 
  1523.            terminate when the existing users have logged off (or timed out), or 
  1524.            when a Q comand is issued. 
  1525.  
  1526.    Q       Quick shutdown.  The program closes down even if there are logged-in 
  1527.            users. 
  1528.  
  1529.  
  1530. ΓòÉΓòÉΓòÉ 11.1. Command line parameters ΓòÉΓòÉΓòÉ
  1531.  
  1532. Command line parameters 
  1533.  
  1534. Normally you don't need any parameters when invoking FTPD.EXE, because the 
  1535. server takes its parameters from the INI file.  (And the contents of the INI 
  1536. file are controlled by the setup program.)  You may, however, override the 
  1537. parameters in the INI file by giving command-line parameters. 
  1538.  
  1539. There are several optional parameters. These all have the form of a letter 
  1540. followed by a (decimal) number, and they can be given in any order. 
  1541.  
  1542.    D       Detailed transaction logging (default 0). 
  1543.  
  1544.                 0         No logging 
  1545.                 1         Logging to the disk file FTPTRANS.LOG 
  1546.                 2         Logging to the screen 
  1547.                 3         Logging to both the screen and the disk file 
  1548.  
  1549.    F       Free space threshold (megabytes).  Users can't upload to a drive 
  1550.            that has less than this amount of free space available. The default 
  1551.            is 10. 
  1552.  
  1553.    G       Maximum number of guest users.  If you make this smaller than the 
  1554.            value for M (see below), you effectively reserve some slots for 
  1555.            non-guest users.  The default is M-1. 
  1556.  
  1557.    L       User logging option (default 1). 
  1558.  
  1559.                 0         No logging 
  1560.                 1         Logging of successful file transfers 
  1561.                 2         Logging of successful and unsuccessful file transfers 
  1562.                 3         Logging of all users 
  1563.  
  1564.            The log is a text file called FTPUSERS.LOG.  You can edit it or 
  1565.            delete it without doing any harm. 
  1566.  
  1567.    M       Maximum number of simultaneous users.  To limit the number to 12, 
  1568.            for example, use the command 
  1569.                   ftpd m12 
  1570.            The default is 10. 
  1571.  
  1572.    P       The server's port number.  To make the server listen on port 5003, 
  1573.            for example, you start the program with the command 
  1574.                   ftpd p5003 
  1575.            The default port number is 21. 
  1576.  
  1577.    T       Timeout limit, i.e. the time before an inactive user is forcibly 
  1578.            removed.  The value is in seconds, and the default is 900. 
  1579.  
  1580.  
  1581. ΓòÉΓòÉΓòÉ 11.2. Running from inetd ΓòÉΓòÉΓòÉ
  1582.  
  1583. Running the server from inetd 
  1584.  
  1585. Inetd, which is part of the Warp 4 distribution, is a "listener" program that 
  1586. can intercept incoming connection attempts, and start up a server when needed. 
  1587.  
  1588. The advantage is that FtpServer doesn't actually get loaded into main memory 
  1589. until a client wants to connect.  Thus, it might be a good option if you expect 
  1590. clients to connect only occasionally. 
  1591.  
  1592. The disadvantage is that a separate copy of the server is started for each 
  1593. logged-in user.  This makes inetd a bad choice if you expect lots of 
  1594. connections. 
  1595.  
  1596. If you want to run FtpServer from inetd, the way to do it is as follows: 
  1597.  
  1598.    1. Ensure that inetd will be run the next time you boot. The usual way of 
  1599.       doing this is to include the line 
  1600.             start /min inetd 
  1601.       in your TCPSTART.CMD, and to invoke TCPSTART.CMD from your startup 
  1602.       folder.  TCPSTART.CMD may be found in the directory \tcpip\bin. 
  1603.  
  1604.    2. Edit the file \mptn\etc\inetd.lst so that it contains the line 
  1605.          ftp tcp start /C /min d:\Apps2\FtpServer\ftpd.exe 
  1606.       (adjusting the path so that it refers to the directory where you've 
  1607.       installed FtpServer). 
  1608.  
  1609.  Note:  In earlier releases the inetd users had to use a file called ftpd.cmd. 
  1610.  That command file is now obsolete. 
  1611.  
  1612.  You may also include parameters on the inetd.lst line that invokes ftpd.exe, 
  1613.  subject to the following conditions: 
  1614.  
  1615.    1. The M parameter is useless, because in this mode of operation the program 
  1616.       is handling exactly one user. 
  1617.  
  1618.    2. The P parameter, if present, will be ignored.  When running from inetd, 
  1619.       you don't get a choice of ports. 
  1620.  
  1621.  In principle you can now start inetd.  In practice I've found that inetd 
  1622.  doesn't release ports reliably, so if you already have inetd running you'll 
  1623.  probably have to re-boot. 
  1624.  
  1625.  Remark: I'm starting to suspect that inetd adds more overhead than it saves, 
  1626.  so I've reverted to not using it on my own machine. 
  1627.  
  1628.  
  1629. ΓòÉΓòÉΓòÉ 11.3. Running FtpServer detached ΓòÉΓòÉΓòÉ
  1630.  
  1631. Running the server as a detached program 
  1632.  
  1633. If you want to run the server detached, the appropriate command is 
  1634.     DETACH FTPD 
  1635. (with parameters, if desired).  Note that a detached program does not have any 
  1636. way of doing screen output or keyboard input, so you can't get any screen 
  1637. messages in this case.  Nor can you use the keyboard G and Q commands. 
  1638.  
  1639. Although you can't shut down the server from the keyboard in this case, you can 
  1640. still shut it down by using the SITE MNGR commands. 
  1641.  
  1642.  
  1643. ΓòÉΓòÉΓòÉ 11.4. Welcome messages ΓòÉΓòÉΓòÉ
  1644.  
  1645. Welcome messages 
  1646.  
  1647. If you want to give a message to users when they log in, put a plain text file 
  1648. called WELCOME.MSG or WELCOME0.MSG in the same directory as ftpd.exe. 
  1649.  
  1650.      WELCOME0.MSG, if present, is displayed to the user when the initial 
  1651.       connection is made. 
  1652.      WELCOME.MSG, if present, is displayed to the user after the username and 
  1653.       password have been accepted. 
  1654.  
  1655.  You can use both of these options together, if you wish, but it would probably 
  1656.  be less confusing to the users if you had only one message. 
  1657.  
  1658.  You can also put a text file called DIR.MSG in any user directory. Users will 
  1659.  get this message the first time they go to that directory. 
  1660.  
  1661.  There is a limited form of macro expansion available in these message files. 
  1662.  The following macros may be included. 
  1663.  
  1664.    %i"filename" Includes the contents of the given file in the message. Nesting 
  1665.            is permitted; that is, the included file may also contain a %i 
  1666.            macro.  In the case of WELCOME.MSG or WELCOME0.MSG the filename may 
  1667.            be given as an absolute pathname, but if relative then it is 
  1668.            relative to the directory in which ftpd.exe is running.  (Note that 
  1669.            you should never give non-trusted users access to this directory.) 
  1670.            In the case of DIR.MSG, the filename is interpreted in the way the 
  1671.            client sees the file system - i.e. if relative then it is relative 
  1672.            to the client's current directory - and the client must have 
  1673.            permission to read this file. 
  1674.  
  1675.    %m      Expands to a character string giving the maximum allowed number of 
  1676.            users with the current username. 
  1677.  
  1678.    %M      Expands to a character string giving the global maximum allowed 
  1679.            number of users. 
  1680.  
  1681.    %t      Expands to a string giving the local time. 
  1682.  
  1683.    %T      For now, this is the same as %t. 
  1684.  
  1685.    %u      Expands to a string giving a user number within this user's group. 
  1686.  
  1687.    %U      Expands to a string giving this user's global user number. 
  1688.  
  1689.    %%      The '%' character. 
  1690.  
  1691.  
  1692. ΓòÉΓòÉΓòÉ 11.5. The SITE commands ΓòÉΓòÉΓòÉ
  1693.  
  1694. The SITE commands 
  1695.  
  1696. The SITE PERM command 
  1697.  
  1698. The command SITE PERM returns a three-character string showing whether you have 
  1699. read, write, and/or delete permission for the current directory. (This command 
  1700. was added while I was testing a new feature.  It might be withdrawn in future 
  1701. versions, because it's not particularly useful for most users.) 
  1702.  
  1703. The SITE MNGR commands 
  1704.  
  1705. Commands in this group may be used only from a manager account. Currently the 
  1706. following options are available. 
  1707.  
  1708.  SITE MNGR EXEC 
  1709.            Runs another program.  See below for further details. 
  1710.  
  1711.  SITE MNGR EXIT 
  1712.            Shuts down the server.  (Don't do this unless you really mean it!) 
  1713.  
  1714.  SITE MNGR GXIT 
  1715.            Shuts down the server after the current users have logged out - i.e. 
  1716.            the same action as for the keyboard G command. 
  1717.  
  1718.  SITE MNGR KILL nnn 
  1719.            Forcibly logs out user number nnn. The number must match the one 
  1720.            returned by the SITE MNGR LIST command. 
  1721.  
  1722.  SITE MNGR LIST 
  1723.            Returns a list of currently logged-in users. The main purpose of 
  1724.            this command is to support the Monitor utility. 
  1725.  
  1726.  The SITE MNGR EXEC command starts a new program in a separate session. (If 
  1727.  FtpServer is running detached, then the new program must also run detached.) 
  1728.  For example, you could zip up the user log with the command 
  1729.  
  1730.         site mngr exec zip.exe today.zip ftpusers.log
  1731.  
  1732.  If you want to run a batch file then you need to start a suitable command 
  1733.  shell.  For OS/2 command files and Rexx programs, the appropriate shell is 
  1734.  cmd.exe, as in the following example. 
  1735.  
  1736.         site mngr exec cmd.exe /c test.cmd parameter1 parameter2
  1737.  
  1738.  
  1739. ΓòÉΓòÉΓòÉ 12. The Monitor utility ΓòÉΓòÉΓòÉ
  1740.  
  1741. The Monitor utility 
  1742.  
  1743. The program MONITOR.EXE allows the system manager to see who is currently 
  1744. logged in, and to kill sessions where necessary.  This program can be run 
  1745. either on the same machine as the server, or remotely. 
  1746.  
  1747. There is one optional parameter, which is the name of this program's INI file. 
  1748. Normally you don't have to specify this, because the name MONITOR.INI is 
  1749. assumed by default.  This option exists for the case where you want to run 
  1750. multiple copies of the monitor to monitor different servers, or to use a 
  1751. different font or screen size/position. 
  1752.  
  1753. When you start the program, it attempts to connect to the server.  If it fails 
  1754. to establish a connection, this might mean that the server is not running. 
  1755. Alternatively, it might mean that you are attempting to connect to the wrong 
  1756. machine, or to the right machine with the wrong manager account. In the latter 
  1757. case, see the setup instructions below. 
  1758.  
  1759. Once the program has made a connection to the server, it displays one line per 
  1760. client session. This shows the time the session started, the IP address of the 
  1761. client, and the username. Once you select one item of this display, you will 
  1762. also see the last command issued, and in some cases a display of how many bytes 
  1763. have been transferred in the current operation. 
  1764.  
  1765. Clicking on the "kill user" button will terminate that client session and 
  1766. forcibly log out the user. 
  1767.  
  1768. The "kill server" button allows you to shut down the server.  (Don't do this 
  1769. unless you really mean it.)  You will be asked to confirm the shutdown by 
  1770. selecting either "gradual shutdown" or "quick shutdown".  The difference is 
  1771. that the "gradual shutdown" doesn't terminate the server until all existing 
  1772. clients have logged out. 
  1773.  
  1774. Setting up the Monitor parameters 
  1775.  
  1776. Clicking on the setup button gives you a dialogue with the following items. 
  1777.  
  1778.   Hostname 
  1779.            This specifies the machine on which the server is running, for 
  1780.            example mymachine.here.net.  If the machine has a fixed IP address, 
  1781.            you can avoid a nameserver lookup by specifying a numeric address, 
  1782.            for example 123.45.67.89 
  1783.  
  1784.   Port 
  1785.            This should normally be 21, but you might have set up the server to 
  1786.            accept connections from a non-standard port. 
  1787.  
  1788.   Username 
  1789.            This must be the username for a manager account. 
  1790.  
  1791.   Password 
  1792.            The password for the manager account. 
  1793.  
  1794.   Update interval 
  1795.            The time (in seconds) between queries to the server to get the user 
  1796.            details.  The smaller this value, the more load you're putting on 
  1797.            the server.  A value between 5 and 10 seconds is usually a good 
  1798.            compromise. 
  1799.  
  1800.  When you've finished filling in these details, close this window (or type the 
  1801.  Enter key) to return to the Monitor main display. 
  1802.  
  1803.  
  1804. ΓòÉΓòÉΓòÉ 13. The TMonitor utility ΓòÉΓòÉΓòÉ
  1805.  
  1806. The TMonitor utility 
  1807.  
  1808. TMONITOR.EXE is an older version of the monitor program.  It is included in 
  1809. this distribution for those who prefer to have a text-mode application. 
  1810.  
  1811. When you start the program, it attempts to connect to the server.  If it fails 
  1812. to establish a connection, this might mean that the server is not running. 
  1813. Alternatively, it might mean that you are attempting to connect to the wrong 
  1814. machine, or to the right machine with the wrong manager account. In the latter 
  1815. case, see the instructions for Setting up the Monitor parameters. 
  1816.  
  1817. To kill a client session, use the cursor up/down keys to get to the desired 
  1818. session, and then type the K key. 
  1819.  
  1820. To shut down the server, type Ctrl/K.  (Hold down the Ctrl key while typing K.) 
  1821. You will be asked to confirm the shutdown by typing either G (for a gradual 
  1822. shutdown) or Q (for a quick shutdown). 
  1823.  
  1824. To close the TMonitor program, type the X key. 
  1825.  
  1826. Hint:  If you want to use less screen space, issue the command 
  1827.      MODE CO80,10 
  1828. before running TMonitor.exe. 
  1829.  
  1830.  
  1831. ΓòÉΓòÉΓòÉ 13.1. Setting up the Monitor parameters ΓòÉΓòÉΓòÉ
  1832.  
  1833. Setting up the Monitor parameters 
  1834.  
  1835. When running TMONITOR.EXE, typing S on the keyboard takes you to the setup 
  1836. screen. There you will see four fields that have to be filled in. 
  1837.  
  1838.   Server hostname 
  1839.            This specifies the machine on which the server is running, for 
  1840.            example mymachine.here.net.  If the machine has a fixed IP address, 
  1841.            you can avoid a nameserver lookup by specifying a numeric address, 
  1842.            for example 123.45.67.89 
  1843.  
  1844.   Server port 
  1845.            This should normally be 21, but you might have set up the server to 
  1846.            accept connections from a non-standard port. 
  1847.  
  1848.   User name 
  1849.            This must be the username for a manager account. 
  1850.  
  1851.   Password 
  1852.            The password for the manager account. 
  1853.  
  1854.  When you've finished filling in these details, press the Esc key to return to 
  1855.  the TMonitor main screen. 
  1856.  
  1857.  
  1858. ΓòÉΓòÉΓòÉ 14. The LoadPRM and StorePRM utilities ΓòÉΓòÉΓòÉ
  1859.  
  1860. The LoadPRM utility 
  1861.  
  1862. This utility is needed if you want to manually edit user permission files. It 
  1863. copies information from a PRM file into the server's FTPD.INI.  For example, 
  1864. the command 
  1865.  
  1866.        loadprm example
  1867.  
  1868. takes the information in the file EXAMPLE.PRM and creates or updates an entry 
  1869. in the INI file for a user called "example". 
  1870.  
  1871. Wildcards are permitted. To load the information from all the PRM files in the 
  1872. current directory, use the command 
  1873.  
  1874.        loadprm *
  1875.  
  1876. You do not have to restart the server. The updated user information will take 
  1877. effect the next time a user logs in. 
  1878.  
  1879. The StorePRM utility 
  1880.  
  1881. This utility creates a PRM file by copying the user information from FTPD.INI. 
  1882. You would use it if the INI file already contains user data that you want to 
  1883. edit manually. For example, the command 
  1884.  
  1885.        storeprm example
  1886.  
  1887. takes the information in the INI file for the user called "example", and uses 
  1888. it to create a file EXAMPLE.PRM. (If EXAMPLE.PRM already exists, the original 
  1889. copy is renamed EXAMPLE.BAK.) 
  1890.  
  1891. Wildcards are permitted. To create PRM files for all the existing users, use 
  1892. the command 
  1893.  
  1894.        storeprm *
  1895.  
  1896.  
  1897. ΓòÉΓòÉΓòÉ 15. The LogAnalysis utility ΓòÉΓòÉΓòÉ
  1898.  
  1899. The LogAnalysis utility 
  1900.  
  1901. LogAnalysis.exe is a utility to produce a summary from the FtpServer user log. 
  1902. You run it with the command 
  1903.  
  1904.         LogAnalysis logfilename
  1905.  
  1906. where "logfilename" is the name of the user log file.  If no parameter is 
  1907. supplied, it assumes that the log file name is FTPUSERS.LOG. 
  1908.  
  1909. The results are written to standard output.  You can redirect this to a file, 
  1910. for example 
  1911.  
  1912.         LogAnalysis AUGUST.LOG >August.summary
  1913.  
  1914.  
  1915. ΓòÉΓòÉΓòÉ 16. Development notes ΓòÉΓòÉΓòÉ
  1916.  
  1917.      Development tools 
  1918.  
  1919.      Why Modula-2? 
  1920.  
  1921.      Known bugs 
  1922.  
  1923.      Unresolved issues 
  1924.  
  1925.      Reporting errors 
  1926.  
  1927.      Year 2000 compliance 
  1928.  
  1929.  
  1930. ΓòÉΓòÉΓòÉ 16.1. Development tools ΓòÉΓòÉΓòÉ
  1931.  
  1932. Development tools 
  1933.  
  1934. Some people have asked about the compiler I'm using.  (I guess a lot of people 
  1935. didn't realise that there were Modula-2 compilers for OS/2.)  It's XDS 
  1936. Modula-2, OS/2 native mode version.  You can find out about this, and other 
  1937. Modula-2 compilers for OS/2, at the web page 
  1938.    http://www.ee.newcastle.edu.au/users/staff/peter/os2/os2m2.html 
  1939. (I'm getting a little behind on keeping my web pages up to date, but the 
  1940. information is still basically correct, only the version numbers have changed.) 
  1941.  
  1942. The XDS home page is at 
  1943.    http://www.xds.ru/ 
  1944. This is well worth visiting, because the XDS development team often has "try 
  1945. before you buy" versions of their compilers available for download. 
  1946.  
  1947. FtpServer uses some of the modules from the PMOS/2 library. If you want to know 
  1948. more about PMOS/2, you'll also find that on my web pages.  Source code is 
  1949. available.  My web pages are at 
  1950. http://www.ee.newcastle.edu.au/users/staff/peter/Moylan.html. 
  1951.  
  1952. This documentation was prepared with IBM's IPFC help compiler. 
  1953.  
  1954.  
  1955. ΓòÉΓòÉΓòÉ 16.2. Why Modula-2? ΓòÉΓòÉΓòÉ
  1956.  
  1957. Why Modula-2? 
  1958.  
  1959. I'm often asked why I chose to code FtpServer in Modula-2.  Everyone else seems 
  1960. to be using C or C++, so why don't I? 
  1961.  
  1962. The short answer is that I don't think much of the "everyone else uses it" 
  1963. argument.  If popularity was more important to me than technical merit, I 
  1964. wouldn't be using OS/2. 
  1965.  
  1966. The long answer is contained in a document called "The Case Against C", which 
  1967. can be found at 
  1968. http://murray.newcastle.edu.au/users/ftp/pub/reports/CaseAgainstC.ps.Z. This is 
  1969. a compressed Postscript file.  If you can't handle compressed Postscript, a 
  1970. text-only version (CaseAgainstC.txt) can be found in the same directory. 
  1971.  
  1972. And the medium-length answer is on this page. 
  1973.  
  1974. To begin with, run-time efficiency is not as big an issue as most people seem 
  1975. to think it is.  With modern compiler technology, the main programming 
  1976. languages (apart from things like BASIC and its derivatives) give about the 
  1977. same run-time efficiency.  C and C++ lose out a little because their low-level 
  1978. constructs make it hard for the compiler to do a good job at optimisation; the 
  1979. figures I've seen tend to suggest that a program written in Modula-2 runs a 
  1980. little faster than the same program written in C or C++. However, the 
  1981. difference is typically less than 5%, and hardly worth worrying about. 
  1982.  
  1983. So the big issue is development efficiency.  For a job like this we can rule 
  1984. out languages like BASIC and REXX because they're a little too crude; and we 
  1985. can rule out languages like Fortran because of their poor support for "systems 
  1986. programming" tasks.  We can also rule out a host of lesser-known languages 
  1987. because of the unavailability of OS/2 compilers.  That leaves us with Pascal, 
  1988. Ada, Oberon, Modula-2, C, and C++. 
  1989.  
  1990. I don't use Pascal because Modula-2 is basically an upgraded Pascal, and I 
  1991. might as well use the improved version. 
  1992.  
  1993. I haven't looked into the availability of Ada compilers for OS/2; but in any 
  1994. case I don't like Ada because of its complexity.  The bigger a language is, the 
  1995. more things there are to go wrong. 
  1996.  
  1997. Oberon is a more subjective matter.  Some people will tell you that Oberon is 
  1998. the successor to Modula-2, and is a superior programming language.  My personal 
  1999. opinion is that Oberon has deleted some of the features that make Modula-2 a 
  2000. good language.  I agree, however, that this issue is not entirely clear-cut. 
  2001.  
  2002. That brings us to C and C++.  I've done a lot of C and C++ programming over the 
  2003. years, and it's left me with the feeling that those languages are major 
  2004. barriers to programming efficiency.  It takes me roughly twice the time to get 
  2005. a C or C++ program working as it does to get a comparable Modula-2 program 
  2006. working.  (On some projects I've kept logs to verify this.)  The coding time is 
  2007. roughly the same, but there's a major difference in debugging time.  Everyone I 
  2008. know writes buggy software in C and C++, and then they take forever trying to 
  2009. track down the bugs.  Some developers give up, and sell the software with the 
  2010. bugs still included. 
  2011.  
  2012. There are two main reasons why C software is so bug-prone. 
  2013.  
  2014.    1. Lack of type safety.  C is designed in such a way that the compiler can't 
  2015.       do much error checking, so the compiler gives no warnings for things 
  2016.       that, in a type-safe language, would be reported as errors at compile 
  2017.       time.  You don't see the errors until execution time, and then you're 
  2018.       left wondering what caused the error. 
  2019.  
  2020.    2. Poor support for modular programming.  You can break up a C program into 
  2021.       modules, but they're not truly independent of one another.  A slight 
  2022.       change in one module can have catastrophic effects on other modules. 
  2023.       Once a project grows moderately large, you lose control of your own code. 
  2024.  
  2025.  C++ is a little better in these two respects, but C++ has problems of its own. 
  2026.  The language designers tried to graft high-level features onto a low-level 
  2027.  language, and the result is a mass of inconsistency.  A C++ reference manual 
  2028.  is typically several times as thick as manuals for other programming 
  2029.  languages, because every rule has a maze of exceptions and special cases. 
  2030.  
  2031.  In addition, I've noticed that a lot of C++ programmers seem to have adopted 
  2032.  the philosophy of "let's try this, and hope that it works".  The notion that 
  2033.  you shouldn't write code that you don't understand seems to have become 
  2034.  unfashionable.  Maybe that's the fault of the language (and its libraries), 
  2035.  maybe not.  In any case, it's not the way I prefer to work. 
  2036.  
  2037.  Ultimately, the reason I use Modula-2 is that it lets me get applications 
  2038.  working quickly, it gives me control of large projects, and it doesn't force 
  2039.  me to spend huge amounts of time on debugging.  I'm too old to enjoy the 
  2040.  thrill of tracking down obscure bugs.  I like to get something working, and 
  2041.  then be free to move on to other projects. 
  2042.  
  2043.  Of course, it's difficult to guarantee that any piece of software is bug-free, 
  2044.  no matter what development tools you use.  But I can have the next-best thing, 
  2045.  which is an acceptably small error rate. 
  2046.  
  2047.  
  2048. ΓòÉΓòÉΓòÉ 16.3. Known bugs ΓòÉΓòÉΓòÉ
  2049.  
  2050. KNOWN BUGS IN SERVER 
  2051.  
  2052.      Server shutdown does not work correctly when using version 4.02k of the 
  2053.       TCP/IP stack, although it does work with earlier versions.  Other 
  2054.       information I've received seems to indicate that *ALL* server 
  2055.       applications misbehave with version 4.02k, so it looks as if the fault 
  2056.       lies in the TCP/IP implementation. I have fixed the problem for version 
  2057.       4.02o, but the fix might not work with 4.02k - my impression is that 
  2058.       versions between k and o are seriously buggy. 
  2059.  
  2060.      Uploads not accepted if your free disk space is greater than about 4000 
  2061.       gigabytes.  There doesn't seem to be any urgent need to fix this just 
  2062.       yet, but at the rate disk sizes are growing ... 
  2063.  
  2064.  See also Unresolved issues 
  2065.  
  2066.  
  2067. ΓòÉΓòÉΓòÉ 16.4. Unresolved issues ΓòÉΓòÉΓòÉ
  2068.  
  2069. Unresolved issues 
  2070.  
  2071. These are problems that various people have reported, but which I haven't been 
  2072. able to duplicate. I'd be interested in hearing from anyone who can confirm 
  2073. either that the problem really exists, or that it's now fixed. 
  2074.  
  2075.      Reported: the server can be crashed by a client running JavaScript. This 
  2076.       problem is still a mystery to me, I haven't been able to track down 
  2077.       what's going on. 
  2078.  
  2079.  
  2080. ΓòÉΓòÉΓòÉ 16.5. Year 2000 compliance ΓòÉΓòÉΓòÉ
  2081.  
  2082. Year 2000 compliance 
  2083.  
  2084. According to my tests, FtpServer should continue running correctly until 31 
  2085. December 2079.  (It might also continue working after that; but the OS/2 system 
  2086. clock will not allow me to set the date to 2080 or later.)  This assumes that 
  2087. you are using HPFS disks. 
  2088.  
  2089. Systems using the FAT file system will stop working in 2038. This has nothing 
  2090. to do with FtpServer; it's a fundamental limitation of FAT. 
  2091.  
  2092.  
  2093. ΓòÉΓòÉΓòÉ 16.6. Reporting errors ΓòÉΓòÉΓòÉ
  2094.  
  2095. If you find any error that's not mentioned in this document, please report it 
  2096. to peter@ee.newcastle.edu.au.  The following information would be useful in 
  2097. tracking down the cause of the error: 
  2098.  
  2099.      The version number of the version you are using. 
  2100.  
  2101.      The file errinfo.$$$, if it exists. 
  2102.  
  2103.      Some information about what the server was doing at the time the problem 
  2104.       occurred; for example, the last few lines of the transaction log. 
  2105.