Accessing a time machine / os x / hfs+ volume in linux

In moving my data from my dying os x 10.6.8 (snow leoppard) macbook pro to my 100% linux workstation I ran into a few problems. My laptop is extremely unstable so I initially did not think transferring the data over the network would be a bad idea. Why would I anyway, I had time machine backup volumes with all the data I needed on them.

But in trying to access those from my workstation I ran into a few problems. The filesystem os x uses by default, hfs+ (journaled) is only partly supported by linux. With hfs-utils installed I was able to mount the volume, though read only. Not a problem, I thought, as I only need to copy the data over, not alter it. Boy was I wrong. I was logged in as root and I changed working directories to my home directory in the most recent backup. When I started to copy things over, I got a “permission denied” denied error. Wait, I was root right? No mistake there. No matter what I tried, I could not get access to the files inside my home directory.

After some googling I tried mounting with some masks:

mount -t hfsplus -o umask=0,uid=0,gid=0 /dev/sdb2 /mnt

But it appears those masks are only applied when an ‘unknown’ id is listed at the permissions, and it didn’t work very well because I still had a lot of unknown and undefined id’s in the permissions.

So I tried to create a user with the right uid and gid. No success. By the way, there was a different gid on every file in my home directory even though in os x it was all “nihlaeth:staff”.

I decided I needed the disk writeable to try some chowning. Back in os x I tried chowning recursively. “permission dienied”, even with sudo / root. Then I tried disabling journaling so I would be able to write to it in linux. This should be possible by using disk utility, selecting the volume and then alt-clicking “File” -> disable journaling. Needless to say, os x refused.

At this point I started transferring data from my account to another disk the regular way. But there was one other thing I could try: disk permissions in finder. Go to finder, right click the volume and pick “Get info”. At the bottom yon see some permission settings, and a little lock under it. Unlock, click the cogwheel and click “apply permissions recursively”. Roughly 5 hours later “Locum” was done doing that but the files were still unaccessible.

Other files on the disk outside of the time machine folders were accessible however. I have no idea what kind of funky shit time machine pulls on these files, but I’m not amused. Backups have to be accessible to be of any kind of use. What if your ‘awesome’ os x machine fails and all you have to access your very important and needed files is linux or windows? Well, then you’re screwed. If you have the choice, I advice you to use rsync instead of time machine.

P.S. If you want to be able to write to a non-journaling hfs+ volume, you have to set ‘force rw’ under -o. Writing to a journaled hfs+ filesystem is not possible with linux at this time.

August 12 2013 01:42 pm | Tech

3 Responses to “Accessing a time machine / os x / hfs+ volume in linux”

  1. Andreas Says:


    I suspect that the error message may be misleading. It is likely that Time Machine uses some advanced features of HFS+ which the Linux driver cannot handle. Either way, when rescuing data, it is advisable not to enable write support. An experimental filesystem driver could easily make problems even worse.

    As an alternative you could copy the data over the network with NFS / Samba, which shouldn’t be that slow if you use a wired network (8 MB/s). Another idea would be to copy the data to an external hard drive from OS X.

    Good luck and greetings from a cousin!

  2. Nihlaeth Says:

    Hey, nice to hear from you!

    In the end I just copied the data over manually to a disk and transferring from that. I hate that time machine makes the data so inaccessible though, even from my mac I can’t access the files normally, I need time machine to do that.

    In any case, I used rsync to speed up the process. Had to start over several times because the motherboard of my macbook pro has been fried, so it took me 5 days. But it got the job done.

  3. Lightworksgal Says:

    Perhaps it had to do with ACL’s and other Mac-specific permission and xattr’s. I typically use a program called batchmod to handle this – it can remove all ACL’s recursively, remove xattrs if you wish, change owner/group users and permissions.

    It’s fast and has this type of situation with time machine multiple times for me.

Leave a Reply