nfsserver 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. .TH NFSSERVER 8
  2. .SH NAME
  3. nfsserver, portmapper, pcnfsd \- NFS service
  4. .SH SYNOPSIS
  5. .B aux/nfsserver
  6. [
  7. .I rpc-options...
  8. ]
  9. [
  10. .I nfs-options...
  11. ]
  12. .br
  13. .B aux/pcnfsd
  14. [
  15. .I rpc-options...
  16. ]
  17. .br
  18. .B aux/portmapper
  19. [
  20. .I rpc-options...
  21. ]
  22. .SH DESCRIPTION
  23. These programs collectively provide NFS access to Plan 9 file servers.
  24. .IR Nfsserver ,
  25. .IR pcnfsd ,
  26. and
  27. .I portmapper
  28. run on a Plan 9 CPU server, and should be started in that order.
  29. All users on client machines have the
  30. access privileges of the Plan 9 user
  31. .LR none .
  32. .PP
  33. The
  34. .I rpc-options
  35. are all intended for debugging:
  36. .nr zz \w'\f5-a\f2 addr'+2n/1n
  37. .TP \n(zz
  38. .B -r
  39. Reject: answer all RPC requests by returning the
  40. .B AUTH_TOOWEAK
  41. error.
  42. .TP
  43. .B -v
  44. Verbose: show all RPC calls and internal program state, including 9P messages.
  45. (In any case, the program creates a file
  46. .BI /srv/ name .chat
  47. where
  48. .I name
  49. is that of the program; echoing
  50. .L 1
  51. or
  52. .L 0
  53. into this file sets or clears the
  54. .B -v
  55. flag dynamically.)
  56. .TP
  57. .B -D
  58. Debug: show all RPC messages (at a lower level than
  59. .BR -v ).
  60. This flag may be repeated to get more detail.
  61. .TP
  62. .B -C
  63. Turn off caching: do not answer RPC requests using the
  64. RPC reply cache.
  65. .PP
  66. The
  67. .I nfs-options
  68. are:
  69. .TP \n(zz
  70. .BI -a " addr"
  71. Set up NFS service for the 9P server at network address
  72. .IR addr .
  73. .TP
  74. .BI -f " file"
  75. Set up NFS service for the 9P server at
  76. .I file
  77. (typically an entry in
  78. .BR /srv ).
  79. .TP
  80. .B -n
  81. Do not allow per-user authentication
  82. (default and mandatory).
  83. .TP
  84. .BI -c " file"
  85. .I File
  86. contains the uid/gid map configuration. It is read at startup
  87. and subsequently every hour (or if
  88. .L c
  89. is echoed into
  90. .BR /srv/nfsserver.chat ).
  91. Blank lines or lines beginning with
  92. .L #
  93. are ignored; lines beginning with
  94. .L !
  95. are executed as commands; otherwise lines contain four fields
  96. separated by white space: a regular expression (in the notation of
  97. .IR regexp (6))
  98. for a class of servers, a regular expression for
  99. a class of clients, a file of user id's (in the format of a Unix
  100. password file), and a file of group id's (same format).
  101. .TP
  102. .B -s
  103. Expect a network connection on file descriptor 1
  104. instead of listening for incoming calls.
  105. .TP
  106. .B -t
  107. Listen for incoming TCP calls, rather than UDP calls.
  108. .PP
  109. NFS clients must be in the Plan 9
  110. .B /lib/ndb
  111. database.
  112. The machine name is deduced from the IP address via
  113. .BR ndb/query .
  114. The machine name specified in the NFS Unix credentials
  115. is completely ignored.
  116. .PP
  117. .I Pcnfsd
  118. is a toy program that authorizes PC-NFS clients. All clients
  119. are mapped to uid=1, gid=1
  120. .RB ( daemon
  121. on most systems) regardless of name or password.
  122. .SH EXAMPLES
  123. A simple
  124. .B /lib/ndb/nfs
  125. might contain:
  126. .PP
  127. .EX
  128. !9fs tcp!ivy
  129. \&.+ [^.]+\e.cvrd\e.hall\e.edu /n/ivy/etc/passwd /n/ivy/etc/group
  130. .EE
  131. .PP
  132. A typical entry in
  133. .B /rc/bin/cpurc
  134. might be:
  135. .PP
  136. .EX
  137. aux/nfsserver -a tcp!edith -a tcp!yoshimi -c /lib/ndb/nfs
  138. aux/pcnfsd
  139. aux/portmapper
  140. .EE
  141. .PP
  142. Assuming the CPU server's name is
  143. .BR eduardo ,
  144. the mount commands on the client would be:
  145. .PP
  146. .EX
  147. /etc/mount -o soft,intr eduardo:bootes /n/bootes
  148. /etc/mount -o soft,intr eduardo:fornax /n/fornax
  149. .EE
  150. .PP
  151. Note that a single instance of
  152. .I nfsserver
  153. may provide access to several 9P servers.
  154. .SH FILES
  155. .TF /lib/ndb/nfs
  156. .TP
  157. .B /lib/ndb/nfs
  158. List of uid/gid maps.
  159. .TP
  160. .B /sys/log/nfs
  161. Log file.
  162. .SH SOURCE
  163. .B /sys/src/cmd/9nfs
  164. .SH BUGS
  165. It would be nice to provide authentication for users, but Unix systems
  166. provide too low a level of security to be trusted in a Plan 9 world.
  167. .SH SEE ALSO
  168. RFC1057,
  169. .I "RPC: Remote Procedure Call Protocol Specification, Version 2."
  170. .br
  171. RFC1094,
  172. .I "NFS: Network File System Protocol Specification."