Thursday, May 21, 2009

Silly Apple, CHMODs are for Kids!

My iMac is configured to dual-boot OS X and Jaunty Jackelope (though I suspect that will soon become Leonidas). As such, I like having the ability to listen to music no matter which OS I'm booted into. On Mac, because everything's in iTunes, it's not that big of a deal (obviously). Linux, on the other hand, has a bit of a difficulty negotiating with HFS+ volumes.

It's not that it can't read them, no, it's that it respects UIDs, and UNIX permissions. For whatever the reason, Mac selects a UID of 501 instead of 500 for normal users, and disallows group and other access to items placed within the user's home directory (as it should).

It used to be the case that simply firing up any number of media players (originally XMMS, now Audacious, and more recently Rhythmbox) as root would work fine in reading the HFS+ partition mount. Of course, more and more players have decided running as root is a no-no (which for the most part it is), so what is a person to do?

Well, the easiest solution is a simple chmod -R a+rx. It's quick, easy, and effective. Writing isn't fully (super-duper fully) liked by Linux on HFS+ (something about the catalog files, I think), but just for Mac's security sake as well we're not throwing in write permissions. Now, this is only on the 'Music' parent directory (and all its children), so I fell relatively safe modifying it. And wouldn't you know, it works fine. So why, then, this blog post?

Time machine. It recognizes a different file structure for the data stored in the affected directories, and thus determines it needs to be added to the backup directory. The thing is, the only piece of data which has changed is the metadata relative to the file data! My iTunes library is around 55 GB, and I really don't feel like backing up all that data, again!

Oh well, perhaps in the future Apple will correct the delta methodology to divorce file data from metadata.

Got any other interesting tidbits related to Time Machine?

2 comments :

Sab said...

Well, I've officially submitted a bug report (#6920858) regarding this issue. I'll post any new information I get.

PS: This gets really annoying, as there really isn't a way to undo this, as each new chmod will result in yet another backup!

Sebastian Weigand said...

Get the latest on this post here.

Post a Comment