home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / networking / tcpip / amitcp-support / wustl-ftpdaemon / doc / ftpaccess.man < prev    next >
Encoding:
Text File  |  1994-06-29  |  16.2 KB  |  462 lines

  1.  
  2.  
  3.  
  4.                                                                  ftpaccess(5)
  5.  
  6.  
  7.  
  8.    Name
  9.      ftpaccess - ftpd configuration file
  10.  
  11.    Description
  12.      The ftpaccess file is used to configure the operation of ftpd(1).
  13.  
  14.    Access Capabilities
  15.  
  16.      autogroup <groupname> <class> [<class> ...]
  17.           If an ANONYMOUS user is a member of any of <class>, the ftp server
  18.           will perform a setegid() to <groupname>.  This allows access to
  19.           group-and-owner-read-only files and directories to a particular
  20.           class of anonymous users. <groupname> is a valid group from
  21.           AmiTCP:db/group (or wherever your getgrent() call looks).
  22.  
  23.      class <class> <typelist> <addrglob> [<addrglob> ...]
  24.           Define <class> of users, with source addresses of the form
  25.           <addrglob>.  Multiple members of <class> may be defined.  There may
  26.           be multiple "class" commands listing additional members of the
  27.           class.  If multiple "class" commands can apply to the current ses-
  28.           sion, the first one listed in the access file is used.  Failing to
  29.           define a valid class for a host will cause access to be denied.
  30.           <typelist> is a comma-separated list of any of the keywords
  31.           "anonymous", "guest" and "real".  If the "real" keyword is
  32.           included, the class can match users using FTP to access real
  33.           accounts, and if the "anonymous" keyword is included the class can
  34.           match users using anonymous FTP.  The "guest" keyword matches guest
  35.           access accounts (see "guestgroup" for more information)
  36.  
  37.           <addrglob> may be a globbed domain name or a globbed numeric
  38.           address.
  39.  
  40.      deny <addrglob> <message_file>
  41.           Always deny access to host(s) matching <addrglob>.  <message_file>
  42.           is displayed.  <addrglob> may be "!nameserved" to deny access to
  43.           sites without a working nameserver.
  44.  
  45.      guestgroup <groupname> [<groupname> ...]
  46.           If a REAL user is a member of any of <groupname>, the session is
  47.           set up exactly as with anonymous FTP.  In other words, a chroot()
  48.           is done, and the user is no longer permitted to issue the USER and
  49.           PASS commands.  <groupname> is a valid group from AmiTCP:db/group
  50.           (or wherever your getgrent() call looks).
  51.  
  52.           The user's home directory must be properly set up, exactly as
  53.           anonymous FTP would be.  The home directory field of the passwd
  54.           entry is divided into two directories.  The first field is the root
  55.           directory which will be the argument to the chroot() call.  The
  56.           second half is the user's home directory relative to the root
  57.           directory.  The two halves are separated by a "/./".
  58.  
  59.           Example:
  60.  
  61.  
  62.  
  63.                                                                             1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.    ftpaccess(5)
  71.  
  72.  
  73.           in AmiTCP:db/passwd, the real entry:
  74.  
  75.           guest1|<passwd>|100|92|Guest Account|Work:ftp/./incoming|ftponly
  76.  
  77.           When guest1 successfully logs in, the ftp server will
  78.           chroot("Work:ftp") and then chdir("incoming").  The guest user will
  79.           only be able to access the directory structure under Work:ftp (which
  80.           will look and act as / to guest1), just as an anonymous FTP user
  81.           would.
  82.  
  83.      limit <class> <n> <times> <message_file>
  84.           Limit <class> to <n> users at times <times>, displaying
  85.           <message_file> if user is denied access.  Limit check is performed
  86.           at login time only.  If multiple "limit" commands can apply to the
  87.           current session, the first applicable one is used.  Failing to
  88.           define a valid limit, or a limit of -1, is equivalent to unlimited.
  89.           <times> is in same format as the times in the UUCP L.sys file.
  90.  
  91.      loginfails <number>
  92.           After <number> login failures, log a "repeated login failures" mes-
  93.           sage and terminate the FTP connection.  Default value is 5.
  94.  
  95.      private <yes|no>
  96.           After user logs in, the SITE GROUP and SITE GPASS commands may be
  97.           used to specify an enhanced access group and associated password.
  98.           If the group name and password are valid, the user becomes (via
  99.           setegid()) a member of the group specified in the group access file
  100.           AmiTCP:db/ftpgroups.
  101.  
  102.           The format of the group access file is:
  103.  
  104.           access_group_name:encrypted_password:real_group_name
  105.  
  106.           where access_group_name is an arbitrary (alphanumeric + punctua-
  107.           tion) string.  encrypted_password is the password encrypted via
  108.           crypt(3), exactly like in AmiTCP:db/passwd.  real_group_name is
  109.           the name of a valid group listed in AmiTCP:db/group.
  110.  
  111.           NOTE: For this option to work for anonymous FTP users, the ftp
  112.           server must keep AmiTCP:db/group permanently open and the group
  113.           access file is loaded into memory.  This means that (1) the ftp
  114.           server now has an additional file descriptor open, and (2) the
  115.           necessary passwords and access privileges granted to users via
  116.           SITE GROUP will be static for the duration of an FTP session.
  117.           If you have an urgent need to change the access groups and/or
  118.           passwords *NOW*, you just kill all of the running FTP servers.
  119.  
  120.    Informational Capabilities
  121.  
  122.      banner <path>
  123.           Works similarly to the message command, except that the banner is
  124.           displayed before the user enters the username/password.  The <path>
  125.           is relative to the real system root, not the base of the anonymous
  126.           FTP directory.
  127.  
  128.  
  129.    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                                                  ftpaccess(5)
  137.  
  138.  
  139.           WARNING: use of this command can completely prevent non-compliant
  140.           FTP clients from making use of the FTP server.  Not all clients can
  141.           handle multi-line responses (which is how the banner is displayed).
  142.  
  143.      email <name>
  144.           Defines the email address of the ftp archive maintainer.  This
  145.           string will be printed every time the %E magic cookie is used.
  146.  
  147.      message <path> {<when> {<class> ...}}
  148.           Define a file with <path> such that ftpd will display the contents
  149.           of the file to the user login time or upon using the change working
  150.           directory command.  The <when> parameter may be "LOGIN" or
  151.           "CWD=<dir>".  If <when> is "CWD=<dir>", <dir> specifies the new
  152.           default directory which will trigger the notification.
  153.  
  154.           The optional <class> specification allows the message to be
  155.           displayed only to members of a particular class.  More than one
  156.           class may be specified.
  157.  
  158.           There can be "magic cookies" in the readme file which cause the ftp
  159.           server to replace the cookie with a specified text string:
  160.  
  161.                 %T      local time (form Thu Nov 15 17:12:42 1990)
  162.                 %F      free space in partition of CWD (kbytes)
  163.                         [not supported on all systems]
  164.                 %C      current working directory
  165.                 %E      the maintainer's email address as defined in ftpaccess
  166.                 %R      remote host name
  167.                 %L      local host name
  168.                 %U      username given at login time
  169.                 %M      maximum allowed number of users in this class
  170.                 %N      current number of users in this class
  171.  
  172.           The message will only be displayed once to avoid annoying the user.
  173.           Remember that when MESSAGEs are triggered by an anonymous FTP user,
  174.           the <path> must be relative to the base of the anonymous FTP direc-
  175.           tory tree.
  176.  
  177.      readme <path> {<when> {<class>}}
  178.           Define a file with <path> such that ftpd will notify user at login
  179.           time or upon using the change working directory command that the
  180.           file exists and was modified on such-and-such date.  The <when>
  181.           parameter may be "LOGIN" or "CWD=<dir>".  If <when> is "CWD=<dir>",
  182.           <dir> specifies the new default directory which will trigger the
  183.           notification.  The message will only be displayed once, to avoid
  184.           bothering users.  Remember that when README messages are triggered
  185.           by an anonymous FTP user, the <path> must be relative to the base
  186.           of the anonymous FTP directory tree.
  187.  
  188.           The optional <class> specification allows the message to be
  189.           displayed only to members of a particular class.  More than one
  190.           class may be specified.
  191.  
  192.  
  193.  
  194.  
  195.                                                                             3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.    ftpaccess(5)
  203.  
  204.  
  205.    Logging Capabilities
  206.  
  207.      log commands <typelist>
  208.           Enables logging of individual commands by users.  <typelist> is a
  209.           comma-separated list of any of the keywords "anonymous", "guest"
  210.           and "real".  If the "real" keyword is included, logging will be
  211.           done for users using FTP to access real accounts, and if the
  212.           "anonymous" keyword is included logging will done for users using
  213.           anonymous FTP.  The "guest" keyword matches guest access accounts
  214.           (see "guestgroup" for more information).
  215.  
  216.      log transfers <typelist> <directions>
  217.           Enables logging of file transfers for either real or anonymous FTP
  218.           users.  Logging of transfers TO the server (incoming) can be
  219.           enabled separately from transfers FROM the server (outbound).
  220.           <typelist> is a comma-separated list of any of the keywords
  221.           "anonymous", "guest" and "real".  If the "real" keyword is
  222.           included, logging will be done for users using FTP to access real
  223.           accounts, and if the "anonymous" keyword is included logging will
  224.           done for users using anonymous FTP. The "guest" keyword matches
  225.           guest access accounts (see "guestgroup" for more information).
  226.           <directions> is a comma-separated list of any of the two keywords
  227.           "inbound" and "outbound", and will respectively cause transfers to
  228.           be logged for files sent to the server and sent from the server.
  229.  
  230.    Miscellaneous Capabilities
  231.  
  232.      alias <string> <dir>
  233.           Defines an alias, <string>, for a directory.  Can be used to add
  234.           the concept of logical directories.
  235.  
  236.           For example:
  237.             alias   rfc:    /pub/doc/rfc
  238.  
  239.           would allow the user to access /pub/doc/rfc from any directory by
  240.           the command "cd rfc:".  Aliases only apply to the cd command.
  241.  
  242.      cdpath <dir>
  243.           Defines an entry in the cdpath. This defines a search path that is
  244.           used when changing directories.
  245.  
  246.           For example:
  247.  
  248.             cdpath /pub/packages
  249.             cdpath /.aliases
  250.  
  251.           would allow the user to cd into any directory directly under
  252.           /pub/packages or /.aliases directories. The search path is defined
  253.           by the order the lines appear in the ftpaccess file.
  254.  
  255.           If the user were to give the command:
  256.  
  257.             cd foo
  258.  
  259.  
  260.  
  261.    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                                                  ftpaccess(5)
  269.  
  270.  
  271.           The directory will be searched for in the following order:
  272.  
  273.             ./foo
  274.             an alias called "foo"
  275.             /pub/packages/foo
  276.             /.aliases/foo
  277.  
  278.           The cd path is only available with the cd command. If you have a
  279.           large number of aliases you might want to set up an aliases direc-
  280.           tory with links to all of the areas you wish to make available to
  281.           users.
  282.  
  283.      compress <yes|no> <classglob> [<classglob> ...]
  284.  
  285.      tar <yes|no> <classglob> [<classglob> ...]
  286.           Enables compress or tar capabilities for any class matching any of
  287.           <classglob>.  The actual conversions are defined in the external
  288.           file AmiTCP:db/ftpconversions.
  289.  
  290.      shutdown <path>
  291.           If the file pointed to by <path> exists, the server will check the
  292.           file regularly to see if the server is going to be shut down.  If a
  293.           shutdown is planned, the user is notified, new connections are
  294.           denied after a specified time before shutdown and current connec-
  295.           tions are dropped at a specified time before shutdown.  <path>
  296.           points to a file structured as follows:
  297.  
  298.            <year> <month> <day> <hour> <minute> <deny_offset> <disc_offset>
  299.            <text>
  300.  
  301.            <year> any year > 1970
  302.            <month> 0-11 <---- LOOK!
  303.            <hour> 0-23
  304.            <minute> 0-59
  305.  
  306.           <deny_offset> and <disc_offset> are the offsets in HHMM format
  307.           before the shutdown time that new connections will be denied and
  308.           existing connections will be disconnected.
  309.  
  310.           <text> follows the normal rules for any message (see "message"),
  311.           with the following additional magic cookies available:
  312.  
  313.                %s      time system is going to shut down
  314.                %r      time new connections will be denied
  315.                %d      time current connections will be dropped
  316.  
  317.           all times are in the form: ddd MMM DD hh:mm:ss YYYY.  There can be
  318.           only one "shutdown" command in the configuration file.
  319.  
  320.           The external program ftpshut(8) can be used to automate the process
  321.           of generating this file.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                             5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.    ftpaccess(5)
  335.  
  336.  
  337.    Permission Capabilities
  338.  
  339.      chmod <yes|no> <typelist>
  340.  
  341.      delete <yes|no> <typelist>
  342.  
  343.      overwrite <yes|no> <typelist>
  344.  
  345.      rename <yes|no> <typelist>
  346.  
  347.      umask <yes|no> <typelist>
  348.           Allows or disallows the ability to perform the specified function.
  349.           By default, all users are allowed.
  350.  
  351.           <typelist> is a comma-separated list of any of the keywords
  352.           "anonymous", "guest" and "real".
  353.  
  354.      passwd-check <none|trivial|rfc822> (<enforce|warn>)
  355.           Define the level and enforcement of password checking done by the
  356.           server for anonymous ftp.
  357.  
  358.             none      no password checking performed.
  359.             trivial   password must contain an '@'.
  360.             rfc822    password must be an rfc822 compliant address.
  361.  
  362.             warn      warn the user, but allow them to log in.
  363.             enforce   warn the user, and then log them out.
  364.  
  365.      path-filter <typelist> <mesg> <allowed_charset> {<disallowed regexp>
  366.           For users in <typelist>, path-filter defines regular expressions
  367.           that control what a filename can or can not be.  There may be mul-
  368.           tiple disallowed regexps.  If a filename is invalid due to failure
  369.           to match the regexp criteria, <mesg> will be displayed to the user.
  370.           For example:
  371.  
  372.             path-filter anonymous AmiTCP:db/pathmsg ^[-A-Za-z0-9._]*$ ^. ^-
  373.  
  374.           specifies that all upload filenames for anonymous users must be
  375.           made of only the characters A-Z, a-z, 0-9, and "._-" and may not
  376.           begin with a "." or a "-".  If the filename is invalid,
  377.           AmiTCP:db/pathmsg will be displayed to the user.
  378.  
  379.      upload <root-dir> <dirglob> <yes|no> <owner> <group>
  380.           Define a directory with <dirglob> that permits or denies uploads.
  381.  
  382.           If it does permit uploads, all files will be owned by <owner> and
  383.           <group> and will have the permissions set according to <mode>.
  384.  
  385.           Directories are matched on a best-match basis.
  386.  
  387.           For example:
  388.             upload  /var/ftp  *               no
  389.             upload  /var/ftp  /incoming       yes  ftp  daemon  0666
  390.             upload  /var/ftp  /incoming/gifs  yes  jlc  guest   0600  nodirs
  391.  
  392.  
  393.    6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                                                  ftpaccess(5)
  401.  
  402.  
  403.           This would only allow uploads into /incoming and /incoming/gifs.
  404.           Files that were uploaded to /incoming would be owned by ftp/daemon
  405.           and would have permissions of 0666.  File uploaded to
  406.           /incoming/gifs would be owned by jlc/guest and have permissions of
  407.           0600.
  408.  
  409.           The optional "dirs" and "nodirs" keywords can be specified to allow
  410.           or disallow the creation of new subdirectories using the mkdir com-
  411.           mand.
  412.  
  413.           The upload keyword only applies to users who have a home directory
  414.           (the argument to the chroot() ) of <root-dir>.
  415.  
  416.    Files
  417.      AmiTCP:db/ftpaccess
  418.  
  419.    See Also
  420.      ftpd(1), ftplog(5), ftpconversions(5), ftpshut(8)
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                             7
  460.  
  461.  
  462.