OSX Lion SMB Samba XBMC fix

This is an update to my last post regarding fixing samba in OSX Lion. I have since ditched samba altogether in favour of NFS. NFS is built into OSX as standard & is a very fast unix sharing protocol. It’s quite hard to configure but thanks to a handy OSX tool called NFS Manager it couldn’t be simpler to setup. NFS is now also supported in XBMC and Firecores Media Player for ATV2 so this is a good time to get to grips with NFS & rid your life of Samba once & for all.

Ok First you need to grab a copy of NFS Manager for free & Install. Its available from NFS Manager

Drag it to your applications folder & fire it up.

Once it opens you need to click on share definitions

Click the + sign to add a definition and then use the select box to select your directory/drive to share

If you follow the options in the picture you will have a share accessible to everyone (my network is double firewalled, and the internal subnetwork is on a different subnet & IP range so it’s fine for me to use this). You can also set directories as Read Only but this will stop you being able to delete from within XBMC. This is the simplest setup available & best to get you started with XBMC & NFS sharing.

you may also want to click the show advanced options and select to allow mounting of any sub folder, great for XBMC

you need to set the -N option in /System/Library/LaunchDaemons/com.apple.nfsd.plist as below – this allows you to connect from XBMC (needs to be added to allow Non Root users to connect).



/sbin/nfsd
-N

Once everything is setup you will want to restart NFS for your changes to take effect

sudo nfsd restart
 

Now in XBMC you can add the share. Click add share, and then click on the zeroconf button. Your computer name should appear with NFS next to it, click the your computer & select the share. That is it, you are ready to go. Sharing with NFS is great, buffering is much quicker & directory browsing much snappier. Now you can rid your life of buggy SMB hacks once & for all.

John Large

My name is John Large. I am a Web Developer, E-commerce site owner & all round geek. My areas of interest include hardware hacking, digital privacy & security, social media & computer hardware. I’m also a minimalist in the making, interested in the Tiny House movement & the experience economy along with a strong interest in sustainability & renewable energy. When I’m not tapping on a keyboard or swiping a smart phone I can be found sampling great coffee, travelling the world with my wife Vicki (who writes over at Let’s Talk Beauty) & generally trying to live my life as unconventionally as possible.

32 thoughts to “OSX Lion SMB Samba XBMC fix”

  1. thanks heaps for this – I held off with the LION update to the last moment (june 30th MobileME Deadline) for this very reason.
    As a note – to get this to work properly from XBMC i had to also make sure that in NFS Manager under NFS Server – Configuration: I had to make sure that both options – Require mount requests to come from privileged ports & Require NFS requests to come from privileged ports – where unchecked (restart Required.)

    After I did that – worked like a treat.

    Matt 🙂

  2. Glad it helped.

    I didn’t need to use those extra options as I had already been messing with nfs through config files before Nfs manager. Glad it’s working for you now. Much better than the samba hack and should work going forward into mountain lion.

  3. I followed your instructions to a T and I’m able to click into the name for the media source (ie “TV Shows”) that has my desired folder in it (/users/username/Movies) but I can’t click on it to access the folder. Any thoughts?

  4. Hi.

    Yes, you need to do the following.

    1. To allow regular (non-root) users to connect to your NFS shared folders, you’ll need to edit the “/System/Library/LaunchDaemons/com.apple.nfsd.plist” file. Open it and add the option “-N” to the startup parameters as follows

    See XBMC NFS OSX

    If you don’t do this step, XBMC will only be able to access the Mac’s shared NFS folders if XBMC is running as root (normally, XBMC does not run as root, so you will almost certainly want to do this first step and add the -N parameter).

  5. hi Katelyn,

    I was having that exact problem(could click on them from XBMC but not open them to select them) But fixed it by UNCHECKING the 2 checkboxes I mentioned in my comment above.

    I’ve also found that even though as you are setting up the Media sources in XBMC you search by computer name – after you select it XBMC/NFS resolves the link to the IP address of the mac with the shares on it – this could cause problems down the track if you are using DHCP on your local network(as your ip address will change) – I statically assigned the IP address of my mac and all has been working sweetly since

    Matt 🙂

  6. Thanks a ton for putting this together and to Matt for his post. I was having a similar problem due to a box being checked. I’ve also used SMBup (which stopped working for me on my Mac) as well as UPnP, using the Playback software. My issue with UPnP (or maybe it’s a function of Playback) is I can’t “resume” where I left off. NFS resolves this, but files seem to be buffering more often. Is there any way to optimize NFS to minimize buffering?

  7. Hi

    wonderful helpful blog.

    Is this solution also working for mountain lion?
    I am trying to find my computer with the NFS name behind it in XBMC ad source but it is not there…..

    I followed your instructions exactly as described. Did restarts on both my mac and my apple tv with atvflas and xbmc on it.

  8. i followed your instructions but keep getting this error message

    /Volumes/Series using UUID DA628E7C-D0D2-4D8C-8262-A82326899ECA
    Can’t export /Volumes/Series/Series: Operation not supported (45)
    exports:1: kernel export registration failed: NFS exporting not supported by fstype “afpfs” (fh)

    can you help me out?

  9. Hi.

    Sorry for the delay, issues going on with Family. I can’t say I’ve ever suffered buffering with NFS, if anything there is less overhad than SMB and it’s much faster. Maybe consider your network setup, remember larger files, especially HD content will be more bandwidth heavy. I’ve found that even with 802.11n any 1080p content needs a good hard wired ethernet network. Gigabit if you have the kit.

  10. On your XBMC have a look under the zeroconf when adding a source, your NFS shares should be announced automatically in there, I know mine are.

  11. Hi! thank you for a good helpfull blogg, i use SMBup in this moment but want to use NFS instead. I have installed NFS Manager on my mac with Lion. In XBMC on my apple tv 2 i can see NFS and my computer name, after that i can´t click any longer to my files.

    In your blogg you describe that you must edit “/System/Library/LaunchDaemons/com.apple.nfsd.plist”, i think thats the problem? can you help med ?

    Thanks! / Christopher

  12. Is it still free? I downloaded the software and followed all the steps, but XBMC cannot find the share. I get a message saying its in demonstration mode and I’ll need to purchase a key to “make it work”.

  13. Thanks for the quick response. It didn’t work =(. I think it has something to do with the device I’m running xbmc from. The device is called the G Box Midnight. It’s running Android 4 and some random version of XBMC for Android. I’ve tried so many variations of firmware/xbmc updates. Some work better than others, as far as jitteriness and streaming within nav-x is concerned. However, I have yet to find a solution for SMB or AFP, and now NFS sharing. =(. I can see the files via SMB, however they wont play. The log file is what brought me here and turned me on to NFS. Any suggestions??

  14. Thanx for a great walk through. I have a problem though. Im all new to the terminal and the step thats handeling “set the -N option” is mentioned very briefly. I have no idea to actually do this? Any walk throughs for this?

    All help appreciated…

  15. I’d install text wrangler on your mac. It will allow you to edit the file, add the -N tag and save the file by authenticating with your mac password.

    Then go to terminal & type nsfd restart. If that doesn’t work restart your mac.

  16. I get an error when i try to share a folder on my NAS. I am following your settings in the picture (NFS Manager) but when i press apply i get this:

    — ERROR REPORT START —
    NFS Server Rejected the combination of settings!
    Please review the share definitions to correct the problem. The NFS server has returned the following description of the problem:

    /Volumes/billeder using UUID D6A29FBF-4931-403B-9E2D-F4086C7C4830
    Can’t export /Volumes/billeder: Invalid argument (22)
    exports:1: kernel export registration failed
    — END —

    Any ideas what i am doing wrong? Its a Verbatim NAS 1T

  17. Hi There – If I am doing this from scratch, how do I start – should I intall XMBC per your previous post then run NFS per the above instructions? I am a little confused I’m sorry. I intalled NFS but there was no file to set the -N option in /System/Library/LaunchDaemons/com.apple.nfsd.plist ??

    Your assistance would be greatly appreciated – I am a novice with MAC’s (recently converted) and I am still learning 🙂

  18. Hi.

    I’d start with getting XBMC running on the ATV1. once this is running you can always setup AFP shares straight from the Mac System Preferences to get you up & running with sharing media to your ATV1.

    With regards NFS and the -N option, the file should be there. Browse to the following folder using the go> go to folder option at the top of your finder window and browse to /System/Library/LaunchDaemons/

  19. It must be something to do with the fact you are using a NAS. You shouldn’t be sharing a NAS via NFS from your mac as the NAS should be doing the sharing. Most NAS devices have an NFS option, failing that it should have SMB which will work just fine with XBMC.

    Don’t share a NAS via your computer, it’s an extra node which shouldn’t be added into your network sharing.

  20. thanks so much for this fix! I recent bought a new router and wanted to make sure I stream the best way possible 🙂 smb wasn’t working for me anymore so I’m really helped by your explanation.

  21. Hello,
    seems like the best solution out here so far, however, I have encountered a problem that somebody else encountered before me as well, as I can see.. the file /System/Library/LaunchDaemons/com.apple.nfsd.plist doesn’t exist.. can’t find it anywhere, which kinda puts a stop to the whole process.
    Thanks in advance. 🙂

  22. Hi. I tried to follow your simple instructions but I received the following error:

    The NFS server rejected this combination of share definitions.
    Please review the share definitions to correct the problem. The NFS server has returned the following description of the problem:

    /Volumes/TOSHIBAEXT using UUID 52E1C111-8296-4A12-9E95-CF1B6F84A650
    Can’t export /Volumes/TOSHIBAEXT: Operation not supported (45)
    exports:1: kernel export registration failed: NFS exporting not supported by fstype “fusefs_txantfs” (fh)

    TOSHIBAEXT is a NTFS hard drive attached via USB to the computer I am trying to run NFS. I do not have Samba installed and I believe i still have OSX internet sharing enabled (as this tutorial didnt mention turning it off). I am actually not trying to get this to work with XBMC but Goodplayer on my iPad which used to connect to the NTFS shares on Snow Leopard but not longer does so on OSX.

    Could you help a brother out?

  23. Help!!! Followed the instructions to a tee, thanks for this. but although I can share the movies etc when I select one to play nothing happens and I get and error:

    INFO: FileSmb->Open: Unable to open file : ‘smb://MATTHEWSIMAC/Passport/Movies/Kids/tad%2ethe%2elost%2eexplorer%2e2012%2ebdrip%2ex264%2ddocument%2emkv’
    unix_err:’26’ error : ‘Function not implemented’

    I am running an ATV1 on Linux with XMBC crystalbuntu, I have 3 external drives formatted as Mac OS Extended (Journaled) with the Master Boot Record option so I can read and write from my Windows laptop.

    I have been searching for a couple of weeks to find a solution.

    Any ideas.

    Thanks,

  24. UPDATE: This morning when I fired everything up, I am able to play through “System, File Manager” but not through “Movies” and there is also random movies in this view that are not on my drives…..

  25. Excellent post! Thank you so much. Was struggling to get SMB working with Mavericks and XMBC on windows and just wasn’t working until I stumbled on to this page. Thanks so much.

  26. I can’t seems to edit the com.apple.nfsd.plist file. When trying to write out it returns with error!
    What should i do?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.