Configuring Mac OS X (10.4) as an NFS Server
This discusses the required configuration of Mac OS X to enable it to work as an NFS (Network File System) server.
Note that this tutorial is only about the client version of Mac OS X. Instructions for the server version are different. However, this page is about configuring OS X to act as an NFS server (eg, it will export filesystems to other machines). This does not deal with the configuration of OS X as an NFS client (to mount filesystems exported from other machines), but have a look at the link at the end of the page if you need to do that.
Also please note that these instructions apply to version 10.4 (Tiger) of Apple Mac OS X and may not apply to earlier (or future) versions.
Issues and Hints
- If you want to export two (or more) directories, and one of these is a child of the other, you must not create two NetInfo directories, but put the pathes of the two directories to be shared inside a single NetInfo directory. For example, if you want to share both /Users/elvanor and /Users/elvanor/Movies, you should create a single NetInfo directory with the property "name" having the value "/Users/elvanor /Users/elvanor/Movies".
- Failure to do so will result in Mac OS X only exporting the top parent directory (in our case, /Users/elvanor).
- I have had problems when I wanted to export a directory (/Users/elvanor) to a particular machine (for example, "RemoteMachine") and a child of that directory (/Users/elvanor/Movies) to another machine (in my case it was "localhost" - yes I did need to export a directory to my own Mac!). This did not work as expected, and I was forced to include the parent directory (/Users/elvanor) also in the export list for localhost. Else I was not getting the correct exports. This workaround is not ideal, I do not know if it is a bug in the implementation of NFS exports in OS X, or if there is a better way to achieve that. Please mail me if you know more about that issue.
- If encountering problems, make sure the *client side* is also correctly setup! In Gentoo for example, you must have the portmap and nfs services started.