239 lines
4.1 KiB
HTML
239 lines
4.1 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>The NFS Daemons</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Network Administrators Guide"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="The NetworkFile System"
|
|
HREF="x-087-2-nfs.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Mounting an NFS Volume"
|
|
HREF="x-087-2-nfs.mountd.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="The exports File"
|
|
HREF="x-087-2-nfs.exports.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Network Administrators Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-nfs.mountd.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 14. The NetworkFile System</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-nfs.exports.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="X-087-2-NFS.DAEMONS"
|
|
>14.3. The NFS Daemons</A
|
|
></H1
|
|
><P
|
|
>
|
|
|
|
If you want to provide NFS service to other hosts, you have to run the
|
|
<B
|
|
CLASS="COMMAND"
|
|
>rpc.nfsd</B
|
|
> and <B
|
|
CLASS="COMMAND"
|
|
>rpc.mountd</B
|
|
> daemons on your
|
|
machine. As RPC-based programs, they are not managed by
|
|
<B
|
|
CLASS="COMMAND"
|
|
>inetd</B
|
|
>, but are started up at boot time and register
|
|
themselves with the portmapper; therefore, you have to make sure to start them
|
|
only after <B
|
|
CLASS="COMMAND"
|
|
>rpc.portmap</B
|
|
> is running. Usually, you'd use
|
|
something like the following example in one of your network boot scripts:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>if [ -x /usr/sbin/rpc.mountd ]; then
|
|
/usr/sbin/rpc.mountd; echo -n " mountd"
|
|
fi
|
|
if [ -x /usr/sbin/rpc.nfsd ]; then
|
|
/usr/sbin/rpc.nfsd; echo -n " nfsd"
|
|
fi</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
> The ownership information of the files an NFS daemon provides to its clients
|
|
usually contains only numerical user and group IDs. If both client and server
|
|
associate the same user and group names with these numerical IDs, they are
|
|
said to their share uid/gid space. For example, this is the case when you
|
|
use NIS to distribute the <TT
|
|
CLASS="FILENAME"
|
|
>passwd</TT
|
|
> information to all
|
|
hosts on your LAN.</P
|
|
><P
|
|
>On some occasions, however, the IDs on different hosts do not
|
|
match. Rather than updating the uids and gids of the client to match
|
|
those of the server, you can use the <B
|
|
CLASS="COMMAND"
|
|
>rpc.ugidd</B
|
|
>
|
|
mapping daemon to work around the disparity. Using the <I
|
|
CLASS="EMPHASIS"
|
|
>map_daemon</I
|
|
> option explained a little later, you can
|
|
tell <B
|
|
CLASS="COMMAND"
|
|
>rpc.nfsd</B
|
|
> to map the server's uid/gid space to
|
|
the client's uid/gid space with the aid of the
|
|
<B
|
|
CLASS="COMMAND"
|
|
>rpc.ugidd</B
|
|
> on the client. Unfortunately, the
|
|
<B
|
|
CLASS="COMMAND"
|
|
>rpc.ugidd</B
|
|
> daemon isn't supplied on all modern Linux
|
|
distributions, so if you need it and yours doesn't have it, you will need to
|
|
compile it from source.</P
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>rpc.ugidd</B
|
|
> is an RPC-based server that is started from your
|
|
network boot scripts, just like <B
|
|
CLASS="COMMAND"
|
|
>rpc.nfsd</B
|
|
> and
|
|
<B
|
|
CLASS="COMMAND"
|
|
>rpc.mountd</B
|
|
>:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>if [ -x /usr/sbin/rpc.ugidd ]; then
|
|
/usr/sbin/rpc.ugidd; echo -n " ugidd"
|
|
fi</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-nfs.mountd.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-nfs.exports.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Mounting an NFS Volume</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-nfs.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>The exports File</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |