rpc.mountd
NFS mount daemon
- Provided by: nfs-kernel-server (Version: 1:1.3.4-2.1ubuntu5.5)
- Source: nfs-utils
- Report a bug
NFS mount daemon
/usr/sbin/rpc.mountd [options]
The rpc.mountd daemon implements the server side of the NFS MOUNT protocol, an NFS side protocol used by NFS version 2 [RFC1094] and NFS version 3 [RFC1813].
An NFS server maintains a table of local physical file systems that are accessible to NFS clients. Each file system in this table is referred to as an exported file system, or export, for short.
Each file system in the export table has an access control list. rpc.mountd uses these access control lists to determine whether an NFS client is permitted to access a given file system. For details on how to manage your NFS server's export table, see the exports(5) and exportfs(8) man pages.
The NFS MOUNT protocol has several procedures. The most important of these are MNT (mount an export) and UMNT (unmount an export).
A MNT request has two arguments: an explicit argument that contains the pathname of the root directory of the export to be mounted, and an implicit argument that is the sender's IP address.
When receiving a MNT request from an NFS client, rpc.mountd checks both the pathname and the sender's IP address against its export table. If the sender is permitted to access the requested export, rpc.mountd returns an NFS file handle for the export's root directory to the client. The client can then use the root file handle and NFS LOOKUP requests to navigate the directory structure of the export.
The rpc.mountd daemon registers every successful MNT request by adding an entry to the /var/lib/nfs/rmtab file. When receivng a UMNT request from an NFS client, rpc.mountd simply removes the matching entry from /var/lib/nfs/rmtab, as long as the access control list for that export allows that sender to access the export.
Clients can discover the list of file systems an NFS server is currently exporting, or the list of other clients that have mounted its exports, by using the showmount(8) command. showmount(8) uses other procedures in the NFS MOUNT protocol to report information about the server's exported file systems.
Note, however, that there is little to guarantee that the contents of /var/lib/nfs/rmtab are accurate. A client may continue accessing an export even after invoking UMNT. If the client reboots without sending a UMNT request, stale entries remain for that client in /var/lib/nfs/rmtab.
You can protect your rpc.mountd listeners using the tcp_wrapper library or iptables(8).
Note that the tcp_wrapper library supports only IPv4 networking.
Add the hostnames of NFS peers that are allowed to access rpc.mountd to /etc/hosts.allow. Use the daemon name mountd even if the rpc.mountd binary has a different name.
Hostnames used in either access file will be ignored when they can not be resolved into IP addresses. For further information see the tcpd(8) and hosts_access(5) man pages.
TI-RPC is a pre-requisite for supporting NFS on IPv6. If TI-RPC support is built into rpc.mountd, it attempts to start listeners on network transports marked 'visible' in /etc/netconfig. As long as at least one network transport listener starts successfully, rpc.mountd will operate.
exportfs(8), exports(5), showmount(8), rpc.nfsd(8), rpc.rquotad(8), nfs(5), tcpd(8), hosts_access(5), iptables(8), netconfig(5)
RFC 1094 - "NFS: Network File System Protocol
Specification"
RFC 1813 - "NFS Version 3 Protocol Specification"
Olaf Kirch, H. J. Lu, G. Allan Morris III, and a host of others.