Nfs Share For Mac

As Mac OS X has evolved, it has become more UNIX-like in many ways. In some respects, that convergence is incomplete, and in other respects, the divergence is deliberate. The ability of a Mac OS X notebook or workstation to share directories over NFS is an example of the incomplete convergence. The first thing we must do before we proceed with setting up the Network File System (NFS). Also let me know how to mount NFS share in Mac. Jump to solution. In OSX Mavericks, Apple removed the NFS Mount UI from the Disk Utility. Which is truly unfortunate. You can create an /etc/fstab file like on any unix host give the right permissions. Or in Finder, you can click Go - Connect to Server, then give it the path like this: nfs.

Home > Articles > Apple > Operating Systems

  1. Challenges of File Sharing
Page 1 of 21Next >
This chapter addresses the topic of using Mac OS X Server to share files across a network, including how to set up share points with appropriate access settings and configure the specific sharing protocols that Mac OS X Server will use.
This chapter is from the book Share
Apple Training Series: Mac OS X Server Essentials v10.6: A Guide to Using and Supporting Mac OS X Server v10.6

This chapter is from the book

This chapter is from the book

Apple Training Series: Mac OS X Server Essentials v10.6: A Guide to Using and Supporting Mac OS X Server v10.6
  • Configure Mac OS X Server to control access to files and provide services based on user and group accounts
  • Configure Mac OS X Server file services for Mac and Windows clients
  • Configure Mac OS X Server to share files with Mac, Windows, and UNIX clients
  • Configure Mac OS X Server to provide file services to FTP clients
  • Troubleshoot file services on Mac OS X Server
  • Configure Mac OS X Server to provide automatic network mounts

This chapter addresses the topic of using Mac OS X Server to share files across a network. It begins by exploring the challenges associated with file sharing and the issues to consider when setting up file sharing. The main focus of the chapter covers setting up share points with appropriate access settings, and configuring the specific sharing protocols that Mac OS X Server will use. This chapter also addresses automatic network mounts and general file-sharing troubleshooting issues to consider when enabling file services on Mac OS X Server.

Mac OS X Server has many different ways to manage share points and permissions. This chapter takes you through using Server Preferences, Server Admin, and Workgroup Manager to set up and maintain file sharing.

Nfs Share Mac Os X

Challenges of File Sharing

When setting up file services, there are a number of issues to consider. The obvious ones are what types of clients will be accessing your file server, what protocols they will be using, and what access levels they will need.

At first glance, these questions might seem relatively easy to answer, but the true requirements can get very complex. For example, a network share point might require access by Windows and Mac users, using their native protocols, where both platforms might be reading and writing to the same files at the same time. In other cases, you might need to support a complex workflow, such as in a print production environment, where the traditional UNIX permissions model is not sufficient to support the workflow. In other cases, you might have a large number of users and the challenge is managing their appropriate access over a period of time, as user and departmental needs change.

Historically, Mac OS X Server supported multiple platforms, but the experience may not have been optimal. Whereas Mac OS X Server implemented the UNIX permissions model, Windows NT servers later implemented a much different permissions model based on ACLs. In the past, accessing a server from a nonnative client, such as a Windows XP client accessing a Mac OS X v10.3 server, might have led to a confusing interpretation of the permissions available to that user, because the Windows client would have expected the more granular permissions model. Mac OS X Server v10.4 addressed this issue and others by supporting new features, such as ACLs, at both the file system and service levels.

The challenge also lies in the setup of the share points themselves. Careless layout of share points results in a more complex permissions matrix than necessary.

Related Resources

Nfs Share For Mac Desktop

  • Book $55.99
  • eBook (Watermarked) $55.99
  • Web Edition $55.99
Learning has never been so easy!

Assume we have 2 Macs, Mac1 and Mac2. This document will help you to create a NFS share on Mac1 and access it from Mac2. Mac2 will preserve the mount during reboots.

3 Steps total

Step 1: To create an NFS share on Mac1

Open SSH terminal on Mac1
Type in 'sudo nfsd enable'
This starts the nfs server and sets it to startup on reboot.

Edit /etc/exports (create if it does not exist)

Type the full path of the folder you want to share.

Optional: Use the “-alldirs” option to allow clients to mount any directory under there.
If your UIDs across machines do not match the “-mapall” will map all IDs with an ID that has access to the directory.
You can find your ID by typing “id” at the terminal on Mac1.
The /etc/exports on the Mac1 will looks like this (I have used the Macintosh HD volume in this example; you can add/edit lines if you need to share more volumes).

/Volumes/Macintosh HD -mapall=501

Verify the mount using the command 'showmount -e'
(You will see the following output on Mac1)

'/Volumes/Macintosh HD Everyone'

Step 2: To mount this share from Mac2

Open SSH terminal on Mac2
Type in 'cd / && sudo nano .nfsmount.sh'

Copy and paste the following lines to the nano editor
--------------------------------------------------------------------------------------
mkdir /Volumes/Mac1-Macintosh-HD
sudo mount -o rsize=32768,wsize=32768,intr,noatime -t nfs Mac1 (or IP Address):/Volumes/ Macintosh HD /Volumes/Mac1-Macintosh-HD
-------------------------------------------------------------------------------------------------------------
Save and exit the nano editor

This will create a Bash script to create a directory called Mac1-Macintosh-HD under /Volumes and map the Mac1 volume under it.

Set the permissions of the script for root access only:
Type in 'sudo chown -R root:admin .nfsmount.sh'

Now make the script executable:
Type in 'sudo chmod u=rwx .nfsmount.sh'

Now we’ll need to create a .plist file for launchd to handle the script, do the following:
Type in 'cd /Library/LaunchDaemons && sudo nano nfsmount.plist'

Inside the editor, copy and paste the following code:
------------------------------------------------------------------------------------------------------------------------

Label
.nfsmount
ProgramArguments

/.nfsmount.sh

Nfs Share For Mac High Sierra

Mac

UserName
root
GroupName
wheel
RunAtLoad

Debug

---------------------------------------------------------------------------------------------------------------
Save and exit the editor and then change the necessary permissions
Type in 'sudo chown -R root:wheel nfsmount.plist'

Next, we’ll load the plist into launchd:

Type in 'sudo launchctl load nfsmount.plist'

Confirm that the plist loaded:
Type in 'sudo launchctl list | grep nfsmount'
If the plist name appears, it’s installed.

Reboot Mac2 and check if the Mac1 volume is accessible under /Volumes/Mac1-Macintosh-HD

Done!

To remove the .plist, type the following:
Type in 'sudo launchctl unload -w /Library/LaunchDaemons/nfsmount.plist'

Step 3: Reference

http://seanmcgrath.wordpress.com/2010/07/05/setup-nfs-on-mac-os-x-10-6/
http://powercycled.wordpress.com/2012/04/25/spoof-mac-address-from-boot-using-launchd/

Published: Dec 13, 2013 · Last Updated: Jun 06, 2014

Mac Nfs Client

2 Comments

Mac Os Nfs Server

  • Datil
    David_CSG Dec 13, 2013 at 09:57am

    Standard best practices for the location(s) on a Unix system for custom scripts are /usr/local/bin or /opt/local/bin
    (although the 'opt' directory is commonly used by MacPorts or other custom tools)

    Rather than as a hidden file on the top level of the drive.

  • Mace
    Gabrielle.L Dec 13, 2013 at 11:06am

    The computer is called a Mac (short for Macintosh), not a MAC. Generally, MAC refers to Media Access Control, a hardware identifier assigned to a network interface.