Sharing from OSX

From WikiDLXTV
Revision as of 04:34, 19 February 2010 by Netdada (Talk | contribs) (Filled Sharing form OSX)

Jump to: navigation, search

The following has been tested under Mac OSX 10.5.x (Leopard). It might apply as well under OSX 10.6.x (Snow Leopard). On previous OSX versions you might have to use NetInfoManager (though setup might be troublesome).

Setup NFS sharing

1. Create an exports file

  • With TextEdit

Open a new document and type

"/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0"

What the above line tells is: I am sharing the directory /Users/yourusername/sharedfolder (the directory "sharedfolder" has to be created in Finder beforehand and populated with the files you want to share). The directory is read only. The directory is shared to any machine on the internal network under 192.168.1 (check if 192.168.1.x is the actual IP of the internally distributed network with Airport Utility or any other utility of your router).

(More lines pointing to different shared folder can be created)

Save the file with the name "exports" without extension (or, once saved, take off the .txt in finder).

Move this file into /etc of the Mac's startup drive (this folder is hidden, so you need to use some third party app to make the invisible folders temporarily visible).

  • With Terminal (Alternative method - a little more cumbersome)

Open Terminal and enter

"sudo vi /etc/exports"

Once in vi, enter insert mode hitting "I"

Enter

"/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0"

Exit insert mode hitting "ESC"

Enter ":wq!" to exit vi and write the file.

2. Enable NFS sharing

Enter "sudo nfsd enable"

Restart the Mac

3. Check the setup

Open Terminal app

Enter "sudo nfsd checkexports" (if a password is requested enter your login password) No output should be given. This confirms everything is fine.

Enter "showmount -e"

The output should be approximately "Exports list on localhost: /Users/yourusername/sharedfolder192.168.1.0"

4. Setup the net.mounts file for the WDTV/WDTVLive

Edit the net.mounts file on your custom homebrew startup drive adding the line

"xmount 192.168.1.xxx:/Users/yourusername/sharedfolder nameofmountedshare nfs"

(where the IP-part must be the one corresponding to your Mac's IP on the local network)

5. Reboot the WDTV/WDTVLive

  • Either switch off the WDTV and unplug it 10s
  • Or in Terminal app enter "reboot"