Archive for October, 2007

Shared iTunes storage

Friday, October 19th, 2007

I’ve decided to put my CD collection into an iTunes library for ease of listening. I also wanted my wife to be able to listen to the tracks on her iMac. Several articles discuss how to do have a single iTunes repository, so I won’t repeat it in detail.

I created a webDAV share (to provide multi-platform mounting of remote volumes) on my in-house development server, with plenty of unused RAID5 capacity. All the reports indicate that its network transport is faster than netatalk, which we use for Apple File Sharing over TCP. And I just don’t want Samba because I’ve always found Windows Networking to be squirrelly. The server is firewalled, NAT’ed, and is using an unusal port, to reduce the risk of inadvertently exposing the tunes to the internet.

Once that was done, I set my iTunes Advanced preferences to store music on the webDAV volume, and started loading music. We still buy a lot of CDs at live shows, to support the artists, so it took awhile to import some 4000+ songs, but everything worked smoothly. I then created a new iTunes library on the iMac, and imported the tunes. Now we can both listen to our music without having to hunt for CDs.

To make things a little nicer, I bought an Aiport Express, connected its audio output to my stereo, and now we can also play tunes throughout the house. The Apple AirTunes software is very slick and easy to use.

I only ran into one snag. After getting my music loaded, I decided that I also wanted to have authentication to the webDAV volume, just in case someone broke into our private network. I unmounted the music volume, added digest authentication to my Apache2 virtualhost stanza and restarted apache.

Mounting the webDAV volume now required me to provide my username and password, which is what I wanted. The volume is just fine in the Finder, and I can read and copy files just fine. But iTunes now indicates that it can’t find the music. After removing the apache digest authentication iTunes could play the music again.

This is a perplexing thing, because the WebDAV mount appears to be transparently supported by the file system. I can open a terminal window, navigate to it in /Volumes to read and write files on it. I wonder why iTunes has trouble with authentication?

In lieu of password-based access control, I’m denying access except from a few IP addresses.