nfsserver 3.7 KB

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