Sunday, December 13, 2009

How to share files from Linux to Mac OS X with NFS

1. Install the NFS server packages on your Linux machine
2. Place the following in you /etc/exports
/path/to/share/    ip.of.nfs.client(rw,sync,insecure)
For example:
/home/user/     192.168.1.15(rw,sync,insecure)
Note the "insecure".
3. Restart your NFS services on the Linux machine
4. On Mac OS X type Command-K in Finder.
5. Type in nfs://ip.of.nfs.server/path/to/share/. For example:
nfs://192.168.1.15/home/user/
6. Click connect.
You should get a Finder window into the NFS share.

Things to consider if the connection fails:

Is your server running a firewall? If so, have you allowed NFS? If your server is running a firewall and does not need to (e.g. it and the client are in a trusted network), you may want to turn it off.

Do you have the correct IP address in /etc/exports on the Linux server? This is the IP address of the Mac OS X machine. Note that you can use the hostname as well if you have DNS set up or are using hosts files.