Skip to content

OS X File Sharing

For some reason I enjoy supporting multiple operating systems at home. I have a couple Debian boxes, the Powerbook, and my wife’s Windows XP machine which I use on occasion when she’s not trying to produce a PhD thesis. All these systems are in place for various reasons, but it comes down to the fact that each has a purpose and I have the skills and inclination to support them. But when it comes to file sharing on OS X, I’m kind of in a pickle.

I just finished building a 1/2 TB file server which runs Debian. It is working great. I’ve got a software raid partition in place for the sensitive files as well as some other partitions for less crucial stuff (like mp3s and portions of the first 4 seasons of The Family Guy). Obviously I have some NFS shares hooked up so that my other Linux machine can plop its backups on the file server as well as access the cvs repository that is also on the file server. I have some Samba shares defined as well for the XP machine which allows those all important thesis documents to be placed on the raid partition, which can then be backed up far more easily and regularly than the XP machine itself ever has been. And then came OS X.

The obvious choice for OS X file sharing is Apple Filesharing Protocol (AFP) which is supported on Linux by netatalk. So after setting up the shares and getting everything some what working, I discovered a problem with symlinks on the file server when I accessed it through AFP. Namely the symlinks weren’t linking to anything, which as I’m sure you know is kind of a key feature of symlinks. After a little digging I find out that AFP doesn’t support symlinks. Frankly this was unacceptable to me. I use symlinks liberally on the linux boxes and it was going to be a pain to try to change things around so I wasn’t. So, I canned the idea of AFP, figuring I had NFS as a backup and so everything would still be good.

NFS didn’t work out too well either. If you check google, NFS Manager is apparently the utility to use when trying to get NFS to work on OS X. And the utility simplified setting up the shares for me, I still had problems with NFS itself. Connections seem to go away at will. I’m not sure if it is something to do with the PB going to sleep or what. Despite a bunch of people saying the OS X would remount volumes automatically on request, I kept having to force quit Finder to get shares to remount. They would just look like normal empty folders until I KO’d Finder and then I could access the shares again. Needless to say, not an ideal solution. Perhaps I’m doing something wrong, so if you’ve got any ideas I’m all ears.

So now, believe it or not, I’ve somewhat settled on SMB for my OS X file sharing (with a Linux file server). I know, seems kind of weird, but I already had the SMB shares setup for the XP machine, so that wasn’t a big deal and OS X supports SMB fairly well. You just use Go->Connect To Server and type in “smb://fileserver/share” and hit Connect. It will ask for credentials and you can save those in your keychain and it seems to work ok. The only problem is that these shares also seem to get unmounted when the PB is put to sleep so I’m having to reconnect on occasion (command-K in Finder brings up the “Connect To Server” dialog so it isn’t too bad). Also if you mount the SMB share and then drag it to your startup items, the share gets automatically connected on login which is nice. Of course, I rarely log out, so that doesn’t help when the PB goes to sleep and wakes up with no shares.

All in all, I’m a little bummed about the file sharing on OS X. It feels like I’ve been cheated somehow since everything else with the PB has been so good. Plus, using samba for OS X->Linux file sharing just seems wrong somehow. But hey, whatever works or should I say whatever works better than anything else I can dig up.