The options are: .TF "\fL-A autharg"
-D Write very chatty debugging output to the log file (see -l option below).
-n Signals that u9fs is not being invoked with a network connection on standard input and output, and thus should not try to determine the remote address of the connection. This is useful when u9fs is not invoked from inetd (see examples below).
-z Truncate the log file on startup. This is useful mainly when debugging with -D .
-a " authtype Sets the authentication method to be used. Authtype should be rhosts , none , or p9any . The default is rhosts , which uses the ruserok library call to authenticate users by entries in /etc/hosts.equiv or $HOME/.rhosts . This default is discouraged for all but the most controlled networks. Specifying none turns off authentication altogether. This is useful when u9fs is not invoked from inetd (see examples below, or srvssh in srv (4)). Specifying p9any uses the fourth edition Plan 9 authentication mechanisms. The file /etc/u9fs.key , or autharg if specified (see the -A option), is consulted for the authentication data and should be suitably protected. This file must contain exactly three lines: secret (plaintext password), u9fs-user (user id), and plan9-auth.dom (authentication domain).
Finally, factotum must be taught a key of the form:
.EX key proto=p9sk1 dom=plan9-auth.dom user=u9fs-user !password=secret
-A " autharg Used to specify an argument to the authentication method. See the authentication descriptions above.
-l " logfile Specifies the file which should contain debugging output and other messages. The out-of-the-box compile-time default is /tmp/u9fs.log .
-m " msize Set msize for 9P2000 (see open (5)).
-u " user Treat all attaches as coming from user . This is useful in some cases when running without inetd ; see the examples.
If fsroot is specified, u9fs will serve only that tree; othwise, it will serve the entire Unix file system.
Plan 9 calls 9P file service 9fs with TCP port number 564. Set up this way on a machine called, say, kremvax , u9fs may be connected to the name space of a Plan 9 process by
.EX 9fs kremvaxFor more information on this procedure, see srv (4) and bind (1).
By default, u9fs serves the entire file system of the Unix machine. It forbids access to devices because the program is single-threaded and may block unpredictably. Using the attach specifier device connects to a file system identical to the usual system except it only permits device access (and may block unpredictably):
.EX srv tcp!kremvax!9fs mount -c /srv/tcp!kremvax!9fs /n/kremvax device(The 9fs command does not accept an attach specifier.) Even so, device access may produce unpredictable results if the block size of the device is greater than 8192, the maximum data size of a 9P message.
The source to u9fs is in the Plan 9 directory /sys/src/cmd/unix/u9fs . To install u9fs on a Unix system with an ANSI C compiler, copy the source to a directory on that system and run make . Then install the binary in /usr/etc/u9fs . Add this line to inetd.conf :
.EX 9fs stream tcp nowait root /usr/etc/u9fs u9fsand this to services :
.EX 9fs 564/tcp 9fs # Plan 9 fsDue to a bug in their IP software, some systems will not accept the service name 9fs , thinking it a service number because of the initial digit. If so, run the service as u9fs or 564 .
On systems where listeners cannot be started, execnet (4) is useful for running u9fs via other network mechanisms; the script srvssh in srv (4) provides this for the ssh protocol.
Semantics like remove-on-close or the atomicity of wstat are hard to provide exactly.