Difference between revisions of "Read/write MAC disk on Ubuntu"

From ITSwiki
Jump to: navigation, search
[quality revision][quality revision]
m (Mttj moved page Access MAC disk on Ubuntu to Read/write MAC disk on Ubuntu without leaving a redirect)
(No difference)

Revision as of 18:49, 4 August 2015

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 -R 99:99 /media/mac

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