183 lines · 3.7 KB · Text
RawDownload
.TH NFSSERVER 8.SH NAMEnfsserver, portmapper, pcnfsd \- NFS service.SH SYNOPSIS.B aux/nfsserver[.I rpc-options...][.I nfs-options...].br.B aux/pcnfsd[.I rpc-options...].br.B aux/portmapper[.I rpc-options...].SH DESCRIPTIONThese programs collectively provide NFS access to Plan 9 file servers..IR Nfsserver ,.IR pcnfsd ,and.I portmapperrun on a Plan 9 CPU server, and should be started in that order.All users on client machines have theaccess privileges of the Plan 9 user.LR none .Currently only NFS version 2 is served..PPThe.I rpc-optionsare all intended for debugging:.nr zz \w'\f5-a\f2 addr'+2n/1n.TP \n(zz.B -rReject: answer all RPC requests by returning the.B AUTH_TOOWEAKerror..TP.B -vVerbose: show all RPC calls and internal program state, including 9P messages.(In any case, the program creates a file.BI /srv/ name .chatwhere.I nameis that of the program; echoing.L 1or.L 0into this file sets or clears the.B -vflag dynamically.).TP.B -DDebug: show all RPC messages (at a lower level than.BR -v ).This flag may be repeated to get more detail..TP.B -CTurn off caching: do not answer RPC requests using theRPC reply cache..PPThe.I nfs-optionsare:.TP \n(zz.BI -a " addr"Set up NFS service for the 9P server at network address.IR addr ..TP.BI -f " file"Set up NFS service for the 9P server at.I file(typically an entry in.BR /srv )..TP.B -nDo not allow per-user authentication(default and mandatory)..TP.BI -c " file".I Filecontains the uid/gid map configuration.  It is read at startupand subsequently every hour (or if.L cis echoed into.BR /srv/nfsserver.chat ).Blank lines or lines beginning with.L #are ignored; lines beginning with.L !are executed as commands; otherwise lines contain four fieldsseparated by white space: a regular expression (in the notation of.IR regexp (6))for a class of servers, a regular expression fora class of clients, a file of user id's (in the format of a Unixpassword file), and a file of group id's (same format)..TP.B -sExpect a network connection on file descriptor 1instead of listening for incoming calls..TP.B -tListen for incoming TCP calls, rather than UDP calls..PPNFS clients must be in the Plan 9.B /lib/ndbdatabase.The machine name is deduced from the IP address via.BR ndb/query .The machine name specified in the NFS Unix credentialsis completely ignored..PP.I Pcnfsdis a toy program that authorizes PC-NFS clients.  All clientsare mapped to uid=1, gid=1.RB ( daemonon most systems) regardless of name or password..SH EXAMPLESA simple.B /lib/ndb/nfsmight contain:.PP.EX!9fs tcp!ivy\&.+  [^.]+\e.cvrd\e.hall\e.edu  /n/ivy/etc/passwd  /n/ivy/etc/group.EE.PPA typical entry in.B /rc/bin/cpurcmight be:.PP.EXaux/nfsserver -a tcp!pie -a tcp!yoshimi -c /lib/ndb/nfsaux/pcnfsdaux/portmapper.EE.PPAssuming the CPU server's name is.BR eduardo ,the mount commands on the client would be:.PP.EX/etc/mount -o soft,intr eduardo:pie /n/pie/etc/mount -o soft,intr eduardo:yoshimi /n/yoshimi.EE.PPNote that a single instance of.I nfsservermay provide access to several 9P servers..SH FILES.TF /lib/ndb/nfs.TP.B /lib/ndb/nfsList of uid/gid maps..TP.B /sys/log/nfsLog file..SH SOURCE.B /sys/src/cmd/9nfs.SH BUGSIt would be nice to provide authentication for users, but Unix systemsprovide too low a level of security to be trusted in a Plan 9 world..SH SEE ALSO.IR nfs (4).brRFC1057,.I "RPC: Remote Procedure Call Protocol Specification, Version 2,"describes Sun's RPC protocol..brRFC1094,.I "NFS: Network File System Protocol Specification,"describes NFS version 2..brRFC1813,.I "NFS Version 3 Protocol Specification.".brRFC3530,.I "Network File System (NFS) version 4 Protocol."