Read/write MAC disk on Ubuntu

From ITSwiki
Revision as of 18:46, 4 August 2015 by Mttj (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Jump to: navigation, search

There is not a beautiful solution for this, as the hfsplus filessytem doesn't not support uid and gid mount options. So a hacky workaround would be the following.

Be sure you only have one Mac harddisk connected when doing the following

sudo apt-get install hfsprogs
sudo mkdir /media/mac

uuid=$(blkid -t TYPE=hfsplus -sUUID|awk -F'"' '{ print $2 }')
echo "UUID=$uuid  /media/mac  hfsplus nobootwait,user 0 0" >> /etc/fstab

sudo apt-get install bindfs
mkdir ~/mac
sudo bindfs -u $(id -u) -g $(id -g) /media/mac ~/mac

Once you mount the USB disk through the file mananger, you will have a directory in your home folder called mac where you can read and write to the USB disk.

The only problem is, that files saved from Linux are saved with user id 1000, where OSX uses 99. So a very hacky way to fix this is

 sudo chown

each time you are done with the harddisk and want to use it on OSX.