home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / lan / netx / doc / useguide.doc < prev   
Text File  |  1987-09-10  |  29KB  |  579 lines

  1.           User's Guide for Net 870526.4
  2.         Copyright 1987 by Phil Karn, KA9Q
  3.  
  4. The executable file "net.exe" provides both client and server Internet
  5. facilities.  It includes code that implements the various ARPA protocols as
  6. both a host and gateway (i.e., it acts as an end-user node as well as an IP
  7. packet switch for transit traffic).  The keyboard and display is used by the
  8. local operator to control both host and gateway level functions, for which a
  9. number of commands are provided.
  10.  
  11. 1. Startup
  12.  
  13. When net.exe is first executed, it attempts to open the file "autoexec.net"
  14. in the root directory of the current drive. If it exists, it is read and
  15. executed as though its contents were typed on the console as commands.  This
  16. feature is useful for setting the local IP address and host name, initializing
  17. the IP routing table, and starting the various Internet services.
  18.  
  19. 2. Console mode
  20.  
  21. The console may be in one of two modes: command mode and converse mode.
  22. In command mode, the prompt "net>" is displayed and any of the commands
  23. described in the next section may be entered. In converse mode, keyboard
  24. input is processed according to the "current session", which may be
  25. either a Telnet or FTP connection.  In a telnet session, keyboard input
  26. is sent to the remote system and any output from the remote system is
  27. displayed on the console. In an FTP session, keyboard input is first
  28. examined to see if it is a known local command; if so it is executed locally.
  29. If not, it is "passed through" to the remote FTP server. (See the section
  30. titled "FTP Subcommands").
  31.  
  32. On the IBM-PC, the user may escape back to command mode by hitting the F10 key.
  33. On other systems, the user must enter the "escape" character, which is by
  34. default control-] (hex 1d, ASCII GS). (Note that this is distinct from the
  35. ASCII character of the same name). The escape character can be changed (see
  36. the "escape" command).
  37.  
  38. 3. Commands
  39.  
  40. This section describes each of the commands recognized while in command mode.
  41. Note that certain FTP subcommands, e.g., put, get, dir, etc, are recognized
  42. only in converse mode with the appropriate FTP session; they are not
  43. recognized while in command mode.  The notation "<hostid>" denotes a host
  44. or gateway, which may be specified in one of two ways: as a symbolic name
  45. listed in the file "\hosts.net", or as a numeric IP address in dotted decimal
  46. notation enclosed by brackets, e.g., [44.0.0.1]. When domain server support
  47. is added, ARPA-style domain names (e.g., ka9q.ampr.net) will also be accepted
  48. if a domain server is available on the network to resolve them into IP
  49. addresses. 
  50.  
  51. <cr>
  52. Entering a carriage return (empty line) while in command mode puts you in
  53. converse mode with the current session. If there is no current session,
  54. net remains in command mode.
  55.  
  56. #
  57. Commands starting with the hash mark (#) are ignored. This is mainly useful
  58. for comments into the autoexec.net file.
  59.  
  60. arp
  61. Displays the Address Resolution Protocol table that maps IP addresses
  62. to their subnet (link) addresses on subnetworks capable of broadcasting.
  63. For each IP address entry the subnet type (e.g., Ethernet, AX.25), subnet
  64. address and time to expiration is shown. If the link address is currently
  65. unknown, the number of IP datagrams awaiting resolution is also shown.
  66.  
  67. attach <hw type> <I/O address> <vector> <mode> <label> <bufsize> <mtu> [<speed>]
  68.  
  69. Configure and attach a hardware interface to the system.
  70.  
  71. A. <hw type> represents the kind of I/O device that is being attached; at
  72. present this may be "3c500" (a 3Com 3c500 Ethernet interface) or "asy" (a
  73. standard PC asynchronous interface using the 8250 chip). "pc100" is for the
  74. PACCOMM PC-100 interface board, but the driver isn't working yet.
  75.  
  76. B. <I/O address> is the base address of the control registers for the device.
  77.  
  78. C. <vector> is the interrupt vector number.  Both the address and the vector
  79. must be in hexadecimal. (You may put "0x" in front of these two values if you
  80. wish, but note that they will be interpreted in hex even if you don't use it).
  81.  
  82. D. <mode> controls how IP datagrams are to be encapsulated in the device's link
  83. level protocol; i.e., it selects among several link protocols that may be
  84. available. The choices here depend on the interface; at present, the 3c500
  85. interface only supports mode "arpa", which uses standard ARPA-style
  86. encapsulation. (In the future, "802" will mean "use 802.3-style
  87. encapsulation").  Two modes for the "asy" device are currently supported:
  88. "slip", which encapsulates IP datagrams directly in SLIP frames without a link
  89. header (for operation on point-to-point lines, compatible with 4.2BSD UNIX
  90. SLIP) and "ax25", which puts an AX.25 UI frame link header and a KISS TNC
  91. control header in front of the datagram before SLIP encoding. (This mode is
  92. intended for operation with the KISS TNC code. The KISS control header
  93. distinguishes between control and data packets).  The Address Resolution
  94. Protocol (ARP) maps IP to link level addresses on Ethernet controllers and on
  95. "asy" lines operating in "ax25" mode.
  96.  
  97. E. <label> gives the name by which the interface will be known in "route"
  98. commands and displays.
  99.  
  100. F. For asynchronous ports, <bufsize> specifies the size of the ring buffer
  101. in bytes to be statically allocated to the receiver; incoming bursts larger
  102. than this may (but not necessarily) cause data to be lost.  For Ethernet,
  103. <bufsize> specifies how many PACKETS may be queued on the receive queue at one
  104. time; if this limit is exceeded, further received packets will be discarded.
  105. This is useful to prevent the system from running out of memory should another
  106. node suddenly develop a case of diarrhea.
  107.  
  108. G. <mtu> is the Maximum Transmission Unit size, in bytes. Datagrams larger
  109. than this value will be fragmented at the IP layer into smaller pieces. Note:
  110. this parameter also sets the limit on the largest allowable incoming SLIP
  111. frame; frames larger than the limit are discarded. At present the limit is
  112. 2 * MTU + 40 bytes; this allows for a link level header plus worst-case
  113. bytestuffing in the SLIP protocol.
  114.  
  115. H. <speed> is needed only for an "asy" line; the controller will be initialized
  116. to the given speed.
  117.  
  118. Examples:
  119.  
  120. # Attach a 3Com Ethernet controller using the standard 3Com address and
  121. # vector (i.e., as it comes out of the box) to use ARPA-standard encapsulation.
  122. # The receive queue is limited to 5 packets, and outgoing packets larger
  123. # than 1500 bytes will be fragmented
  124. attach 3c500 0x300 3 arpa ec0 5 1500
  125.  
  126. # Attach the PC asynch card normally known as "com1" (the first controller)
  127. # to operate in point-to-point slip mode at 9600 baud, calling it "sl0".
  128. # A 1024 byte receiver ring buffer is allocated. Outgoing packets larger
  129. # than 256 bytes are fragmented.
  130. attach asy 0x3f8 4 slip sl0 1024 256 9600
  131.  
  132. # Attach the secondary PC asynch card ("com2") to operate in AX.25 mode
  133. # with an MTU of 576 bytes at 9600 baud with a KISS TNC, calling it "ax0":
  134. attach asy 0x2f8 3 ax25 ax0 1024 576 9600
  135.  
  136. (Note that you cannot use the second asynch controller ("com2") and a 3Com
  137. Ethernet card with standard addressing at the same time because they both
  138. use interrupt vector 3).
  139.  
  140. close [<session #>]
  141. Send a FIN (i.e., initiate a close) on the the current or specified session's
  142. TCP connection (either FTP or Telnet). This is not normally necessary, since the
  143. usual procedure is to ask the remote server to initiate a close ("QUIT" to FTP,
  144. or the logout command appropriate for the remote system in the case of Telnet).
  145. When either FTP or Telnet sees the incoming half of a TCP connection close,
  146. it automatically responds by closing the outgoing half of the connection.
  147. Close is useful in aborting a pending connection to a system that is not
  148. responding, or in closing an open connection to a server that has gone
  149. catatonic. (This is more graceful than the "reset" command, in that it is less
  150. likely to leave the remote TCP in a "half-open" state).
  151.  
  152. echo [accept|refuse]
  153. Displays or changes the flag controlling client Telnet's response to a
  154. remote WILL ECHO offer.
  155.  
  156. The Telnet presentation protocol specifies that in the absence of a negotiated
  157. agreement to the contrary, neither end echoes data received from the other.
  158. In this mode, a Telnet client session echoes keyboard input locally and nothing
  159. is actually sent until a carriage return is typed. Local line editing is also
  160. performed: backspace deletes the last character typed, while control-U deletes
  161. the entire line.
  162.  
  163. When communicating from keyboard to keyboard the standard local echo mode is
  164. used, so the setting of this parameter has no effect. However, many
  165. timesharing systems (e.g., UNIX) prefer to do their own echoing of typed input.
  166. (This makes screen editors work right, among other things). Such systems send
  167. a Telnet WILL ECHO offer immediately apon receiving an incoming Telnet
  168. connection request. If "echo accept" is in effect, a client Telnet session will
  169. automatically return a DO ECHO response. In this mode, local echoing and
  170. editing is turned off and each keystroke is sent immediately (subject to the
  171. Nagle tinygram algorithm in TCP).  While this mode is just fine across an
  172. Ethernet, it is clearly inefficient and painful across slow paths like packet
  173. radio channels. Specifying "echo refuse" causes an incoming WILL ECHO
  174. offer to be answered with a DONT ECHO; the client Telnet session remains
  175. in the local echo mode.  Sessions already in the remote echo mode are
  176. unaffected. (Note: Berkeley Unix has a bug in that it will still echo input
  177. even after the client has refused the WILL ECHO offer. To get around this
  178. problem, enter the "stty -echo" command to the shell once you have logged in.)
  179.  
  180. eol [unix|standard]
  181. Displays or changes Telnet's end-of-line behavior when in remote echo mode.
  182. In standard mode, each key is sent as-is. In unix mode, carriage returns
  183. are translated to line feeds.  This command is not necessary with all UNIX
  184. systems; use it    only when you find that a particular system responds to
  185. line feeds but not carriage returns.  Only Sun UNIX release 3.2 seems to
  186. exhibit this behavior.
  187.  
  188. escape <char>    
  189. Without arguments, displays the current command-mode escape character in hex.
  190. If given an argument, the first character becomes the new escape character.
  191. (This command is not provided on the IBM-PC; on the PC, the escape char is
  192. always F10.)
  193.  
  194. etherstat
  195. Display 3-Com Ethernet controller statistics (if configured).
  196.  
  197. exit
  198. Exit the "net" program and return to MS-DOS (or CP/M).
  199.  
  200. ftp <hostid>
  201. Open an FTP control channel to the specified remote host and enter converse
  202. mode on the new session.  Responses from the remote server are displayed
  203. directly on the screen.
  204.  
  205. gateway [<hostid>]
  206. Displays or sets the host to be used as a "smart" mail relay. Any mail sent
  207. to a hostid not in the host table will instead be sent to the gateway for
  208. forwarding.
  209.  
  210. help
  211. Display a brief summary of top-level commands.
  212.  
  213. hostname [<name>]
  214. Displays or sets the local host's name (an ASCII string such as "ka9q-pc",
  215. NOT an IP address).  Currently this is used only in the greeting messages
  216. from the SMTP (mail) and FTP (file transfer) servers.
  217.  
  218. log [stop | <file>]
  219. Without arguments, indicates whether server sessions are being logged. If
  220. "stop" is given as the argument, logging is terminated (the servers themselves
  221. are unaffected). If a file name is given as an argument, server session log
  222. entries will be appended to it.
  223.  
  224. icmpstat
  225. Displays statistics about the Internet Control Message Protocol (ICMP),
  226. including the number of ICMP messages of each type sent or received.
  227.  
  228. ipaddr [<hostid>]
  229. Displays or sets the local IP address.
  230.  
  231. ipstat
  232. Displays Internet Protocol (IP) statistics, such as total packet counts and
  233. error counters of various types.
  234.  
  235.  
  236. memstat
  237. Displays the internal free memory list in the storage allocator.
  238.  
  239. mss [<size>]
  240. Display or set the TCP Maximum Segment Size in bytes that will be sent on all
  241. outgoing TCP connect request (SYN segments).  This tells the remote end the
  242. size of the largest segment (packet) it may send. Changing MSS affects
  243. only future connections; existing connections are unaffected.
  244.  
  245. mycall [<call>]
  246. Display or set the local AX.25 address.  The standard format is used, e.g.,
  247. KA9Q-0 or WB6RQN-5.
  248.  
  249. param <interface> [param ...]
  250.  
  251. Param invokes a device-specific control routine.  On a KISS TNC
  252. interface, this sends control packets to the TNC.  Data bytes are
  253. treated as hexadecimal.  For example, "param ax0 1 255" will set the
  254. keyup timer (type field = 1) on the KISS TNC configured as ax0 to 2.55
  255. seconds (255 x .01 sec).  On a SLIP interface, the param command allows
  256. the baud rate to be read (without arguments) or set.  The implementation
  257. of this command for the various interface drivers is incomplete and
  258. subject to change. 
  259.  
  260. reset [<tcb_addr>]
  261. If an argument is given, force a local reset (deletion) of the TCP Control
  262. Block (TCB) at the specified memory address. The argument is first
  263. checked for validity. If no argument is given, the TCB belonging to the
  264. current session, if any, is reset. This command should be used with caution
  265. since it does not inform the remote TCP that the connection no longer exists
  266. (although a TCP reset (RST) message will be automatically generated should the
  267. remote TCP send anything after a local reset has been done). It is used to get
  268. rid of a lingering half-open connection after a remote system has crashed.
  269.  
  270. route
  271. route add <dest hostid>[/bits]|default <interface> [<gateway hostid> [<metric>]]
  272. route drop <dest hostid>
  273. With no arguments, "route" displays the IP routing table. "route add" adds
  274. an entry to the routing table, while "route drop" deletes an existing entry.
  275. "route add" requires at least two more arguments, the host id of the target
  276. destination and the local name of the interface to which its packets should be
  277. sent.  If the destination is not local, the gateway's host id should also
  278. be specified. (If the interface is a point-to-point link, then <gateway hostid>
  279. may be omitted even if the target is non-local because this field is only used
  280. to determine the gateway's link level address, if any.  If the destination is
  281. directly reachable, <gateway hostid> is also unnecessary since the destination
  282. address is used to determine the interface link address).
  283.  
  284. The optional "/bits" suffix to the destination host id specifies how
  285. many leading bits in the host id are to be considered significant in the
  286. routing comparisons.  If not specified, 32 bits (i.e., full significance) is
  287. assumed.  With this option, a single routing table entry may refer to
  288. many hosts all sharing a common bit string prefix in their IP addresses. 
  289. For example, ARPA Class A, B and C networks would use suffixes of /8,
  290. /16 and /24 respectively; the command
  291.  
  292. route add [44]/8 sl0 [44.64.0.2]
  293.  
  294. causes any IP addresses beginning with "44" in the first 8 bits to be
  295. routed to [44.64.0.2]; the remaining 24 bits are "don't-cares".
  296.  
  297. When an IP address to be routed matches more than one entry in the routing
  298. table, the entry with largest "bits" parameter (i.e., the "best" match)
  299. is used. This allows individual hosts or blocks of hosts to be exceptions
  300. to a more general rule for a larger block of hosts.
  301.  
  302. The special destination "default" is used to route datagrams to
  303. addresses not in the routing table; it is equivalent to specifying a
  304. /bits suffix of /0 to any destination hostid.  Care must be taken with
  305. default entries since two nodes with default entries pointing at each
  306. other will route packets to unknown addresses back and forth in a loop
  307. until their time-to-live (TTL) fields expire.  (Routing loops for
  308. specific addresses can also be created, but this is less likely to occur
  309. accidentally). 
  310.  
  311. "route drop" deletes an entry from the table. If a packet arrives for the
  312. deleted address and a default route is in effect, it will be used.
  313.  
  314. Here are some examples of using the route command:
  315.  
  316. # Route datagrams to IP address 44.0.0.3 to SLIP line #0.
  317. # No gateway is needed because SLIP is point-to point.
  318. route add [44.0.0.3] sl0 
  319.  
  320. # Route all default traffic to the gateway on the local Ethernet
  321. # with IP address [44.0.0.1]
  322. route add default ec0 [44.0.0.1]
  323.  
  324. # The local Ethernet has an ARPA Class-C address assignment; route all IP
  325. # addresses beginning with 192.4.8 to it
  326. route add [192.4.8]/24 ec0
  327.  
  328. # The station with IP address [44.0.0.10] is on the local AX.25 channel
  329. route add [44.0.0.10] ax0
  330.  
  331. session [<session #>]
  332. Without arguments, displays the list of current sessions, including session
  333. number, remote TCP address and the address of the TCP control block (TCB).
  334. An asterisk (*) is shown next to the "current" session; entering <cr> at this
  335. point will put you in converse mode with that session. Entering a session
  336. number as an argument to the session command will put you in converse mode
  337. with that session.  If the telnet server is enabled, the user is notified
  338. of an incoming request and a session number is automatically assigned. The
  339. user may then select the session normally to converse with the remote user
  340. as though the session had been locally initiated.
  341.  
  342. smtp
  343. Run through the outgoing mail queue and attempt to deliver any pending mail.
  344. This command is periodically invoked by a timer whenever net is running;
  345. executing "smtp" allows the user to "kick" the mail system manually.
  346.  
  347. speed [<line num> [<speed>]]
  348. Without arguments, displays the line number and speed of all asynchronous
  349. devices.  The line number corresponds to the order in which the devices were
  350. attached to the system. With arguments, "speed" changes the speed of a
  351. specific interface. Note that on the IBM PC, any speed is accepted and used
  352. directly to compute the baud rate clock divisor. At high speeds, however, the
  353. divisors are small so large truncation errors may result when nonstandard
  354. speeds are used.
  355.  
  356. start ftp|smtp|telnet|discard|echo
  357. Starts the specified Internet server, allowing remote connection requests.
  358.  
  359. stop ftp|smtp|telnet|discard|echo
  360. Stops the specified Internet server, rejecting any further remote connect
  361. requests. Existing connections are allow to complete normally.
  362.  
  363. tcpkick [<tcb_addr> [<srtt>]]
  364. If there is data on the send queue of the specified tcb, this command forces
  365. an immediate retransmission.  If no tcb_addr is given, the tcb corresponding
  366. to the current session, if any, is used. If an optional srtt value in
  367. milliseconds is given, it replaces the automatically computed round trip time.
  368. This command is useful to speed up recovery from a series of lost packets
  369. since it provides a manual bypass around the normal exponential backoff
  370. retransmission timing mechanisms.
  371.  
  372. tcpstat [<tcb_addr>]
  373. Without arguments, displays several TCP-level statistics, plus a summary of
  374. all existing TCP connections, including TCB address, send and receive queue
  375. sizes, local and remote sockets, and connection state. If <tcb_addr> is
  376. specified, a more detailed dump of the specified TCB is generated, including
  377. send and receive sequence numbers and timer information.
  378.  
  379. telnet <hostid>
  380. Creates a Telnet session to the specified host and enters converse mode.
  381.  
  382. trace [<level>]
  383. Controls packet tracing by the interface drivers. Specific bits enable
  384. tracing of the various interfaces and the amount of information produced.
  385. The trace variable is a 32 bit hexadecimal number with the following
  386. interpretation ("0" nybbles are reserved for future use):
  387.  
  388.        |---- control level of header decoding
  389. 000MI0HL
  390.    || |----- controls whether a hex dump is generated
  391.    ||------- controls which interfaces are to be traced
  392.    |---------controls SMTP tracing
  393.  
  394. AX.25 interface tracing is enabled by setting bit 0x8000, Ethernet tracing by
  395. bit 0x4000, PC-100 by 0x2000 and SLIP by 0x1000.
  396.  
  397. A "H" value of 1 causes a hex dump to be generated of all packets sent or
  398. received on the physical interfaces being traced; a zero disables the hex dump.
  399. Independent of the hex dump function, the value of "L" controls how many
  400. levels of protocol headers are decoded:
  401. 0 - No headers are decoded
  402. 1 - The name and device number of the interface, plus "sent" or "recv"
  403. 2 - Link level headers (AX.25, Ethernet)
  404. 3 - ARP and IP headers
  405. 4 - TCP & UDP headers
  406. (Note that these numbers correspond to the approximate ISO levels of the
  407. various protocols). Each higher setting includes all levels below it, e.g.,
  408. setting H to 4 will print the name and number of the interface, its link
  409. header, the IP header and the UDP or TCP header.  Setting "trace" to 0
  410. disables all tracing.  At present there is no tracing on the "local"
  411. interface; i.e., self connections are not traced.
  412.  
  413. Setting the M control field to 1 traces outgoing SMTP mail sessions.
  414.  
  415. ttl [<val>]
  416. Displays or sets the default time-to-live value placed in each outgoing IP
  417. datagram. This limits the number of switch hops the datagram will be allowed to
  418. take. The idea is to bound the lifetime of the packet should it become caught
  419. in a routing loop, so make the value somewhat larger than the diameter of
  420. the network.
  421.  
  422. window [<val>]
  423. Displays or sets the default receive window size in bytes to be used by TCP
  424. when creating new connections. Existing connections are unaffected.
  425.  
  426. ?
  427. Same as the "help" command.
  428.  
  429. 4. FTP Subcommands
  430.  
  431. When in converse mode with an FTP server, everything typed on the console is
  432. first examined to see if it is a locally-known command. If not, the line is
  433. passed intact to the remote server on the control channel. If it is one of
  434. the following commands, however, it is executed locally. (Note that this
  435. generally involves other commands being sent to the remote server on the
  436. control channel.)  When actively transferring a file, the only acceptable
  437. command is "abort"; all other commands will result in an error message.
  438.  
  439. abort
  440. Aborts a get, put or dir operation in progress. When receiving a file, abort
  441. simply resets the data connection; the next incoming data packet will generate
  442. a TCP RST (reset) in response which will clear the remote server.  When
  443. sending a file, abort sends a premature end-of-file. Note that in both cases
  444. abort will leave a partial copy of the file on the destination machine, which
  445. must be removed manually if it is unwanted. Abort is valid only when a
  446. transfer is in progress.
  447.  
  448. dir [<file>|<directory> [<local file>]]
  449. Without arguments, "dir" requests that a full directory listing of the remote
  450. server's current directory be sent to the terminal.  If one argument is
  451. given, this is passed along in the LIST command; this can be a specific
  452. file or subdirectory that is meaningful to the remote filesystem. If two
  453. arguments are given, the second is taken as the local file into which the
  454. directory listing should be put (instead of being sent to the console).
  455. The PORT command is used before the LIST command is sent.
  456.  
  457. get <remote file> [<local file>]
  458. Asks the remote server to send the file specified in the first argument.
  459. The second argument, if given, will be the name of the file on the local
  460. machine; otherwise it will have the same name as on the remote machine.
  461. The PORT and RETR commands are sent on the control channel.
  462.  
  463. ls [<file>|<directory> [<local file>]]
  464. ls is identical to the "dir" command except that the "NLST" command is
  465. sent to the server instead of the "LIST" command. This results in an
  466. abbreviated directory listing, i.e., one showing only the file names
  467. themselves without any other information.
  468.  
  469. put <local file> [<remote file>]
  470. Asks the remote server to accept data, creating the file named in the
  471. first argument. The second argument, if given, will be the name of the file
  472. on the remote machine; otherwise it will have the same name as on the local
  473. machine.  The PORT and STOR commands are sent on the control channel.
  474.  
  475. type [a|i]
  476. Tells both the local client and remote server the type of file that is to be
  477. transferred. The default is 'a', which means ASCII (i.e., a text file). Type
  478. 'i' means "image", i.e., binary.  In ASCII mode, files are sent as varying
  479. length lines of text in ASCII separated by cr/lf sequences; in IMAGE mode,
  480. files are sent exactly as they appear in the filesystem. ASCII mode should be
  481. used whenever transferring text between dissimilar systems (e.g., UNIX and
  482. MS-DOS) because of their different end-of-line and/or end-of-file conventions.
  483. When exchanging text files between machines of the same type, either mode will
  484. work but IMAGE mode may be somewhat faster. Naturally, when exchanging raw
  485. binary files (executables, compressed archives, etc) IMAGE mode must be used.
  486. This command generates the TYPE command on the control channel.
  487.  
  488. 5. FTP server configuration
  489.  
  490. Since MS-DOS was designed as a single-user operating system, it provides
  491. no access control; all files can be read, written or deleted by the
  492. local user.  It is usually undesirable to give such open access to a
  493. system to remote network users.  The FTP server therefore provides its own
  494. access control mechanism.
  495.  
  496. The file "\ftpusers" is used to control remote FTP access.  The default
  497. is NO access; if this file does not exist, the FTP server will be
  498. unusable.  A remote user must first "log in" to the system with the USER
  499. and PASS commands, giving a valid name and password listed in \ftpusers,
  500. before he or she can transfer files. 
  501.  
  502. Each entry in \ftpusers consists of a single line of the form
  503.  
  504. username password \path permissions
  505.  
  506. There must be exactly four fields, and there must be exactly one space
  507. between each field.  Comments may be added after the last field. 
  508. Comment lines are begun with "#" in column one. 
  509.  
  510. a. "username" is the user's login name.
  511.  
  512. b.  "password" is the required password.  Note that this is in
  513. plaintext; therefore it is not a good idea to give general read
  514. permission to the root directory.  A password of "*" (a single asterisk)
  515. means that any password is acceptable. 
  516.  
  517. c.  "\path" is the allowable prefix on accessible files.  Before any
  518. file or directory operation, the current directory and the user-
  519. specified file name are joined to form an absolute path name in
  520. "canonical" form (i.e., a full path name starting at the root, with ".\"
  521. and "..\" references, as well as redundant \'s, recognized and removed). 
  522. The result MUST begin with the allowable path prefix; if not, the
  523. operation is denied.  NB! Under MS-DOS, this field must use backslashes
  524. ("\"), NOT forward slashes ("/").  This field must always begin with a
  525. "\", i.e., at the root directory. 
  526.  
  527. d.  "permissions" is a decimal number granting permission for read,
  528. create and write operations.  If the low order bit (0x1) is set, the
  529. user is allowed to read a file subject to the pathname prefix
  530. restriction.  If the next bit (0x2) is set, the user is allowed to
  531. create a new file if it does not overwrite an existing file.  If the
  532. third bit (0x4) is set, the user is allowed to write a file even if it
  533. overwrites an existing file, and in addition he may delete files.  Again,
  534. all operations are allowed subject to the path name prefix restrictions. 
  535. Permissions may be combined by adding bits, for example, 0x3 (= 0x2 + 0x1)
  536. means that the user is given read and create permission, but not
  537. overwrite/delete permission.
  538.  
  539. For example, suppose \ftpusers on machine "ka9q-pc" contains the line
  540.  
  541. friendly test \testdir 7
  542.  
  543. A session using this account would look like this:
  544.  
  545. net> ftp ka9q-pc
  546. SYN Sent
  547. Established
  548. 250 ka9q-pc.nnj.ampr.us (Fri Jun 12 18:15:20 1987) FTP Ready
  549. user friendly
  550. 331 Enter password
  551. pass test
  552. 230 Logged in
  553.  
  554. The user now has read, write, overwrite and delete privileges for any file
  555. under \testdir; he may not access any other files.
  556.  
  557. Here are some more sample entries in \ftpusers:
  558.  
  559.  
  560. karn foobar \ 7        # User "karn" with password "foobar" may read, write,
  561.             # overwrite and delete any file on the system.
  562.  
  563. guest bletch \g\bogus 3    # User "guest" with password "bletch" may read any
  564.             # file under \g\bogus and its subdirectories, and may
  565.             # create a new file as long as it does not overwrite
  566.             # an existing file. He may NOT delete any files.
  567.  
  568. anonymous * \public 1    # User "anonymous" (any password) may read files under
  569.             # \public and its subdirectories; he may not create,
  570.             # overwrite or delete any files.
  571.  
  572. I recommend this last entry as a standard convention for keeping a
  573. repository of downloadable files; in particular, the username
  574. "anonymous" is an established ARPA convention. 
  575.  
  576.  
  577. 10 Sept 1987
  578. Phil Karn, KA9Q
  579.