Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My IMac died (power supply issue, out of warranty) and I removed the HDD so I could recover some files. I'm trying to copy files from my Desktop folder on the Mac HDD using Ubuntu 10.04 (running from the CD-ROM), but I get access denied errors when I try to cd or ls into the directory because I'm not the owner.

I tried running chown -R Desktop but I get an error saying that the file system is read-only.

Is there some way I can make the drive read/write or access the files without changing the owner?

Thanks!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The write support for some foreign filesystems in Linux is buggy so turned off by default. This may be why your Mac filesystem was mounted read-only.

If this is a one-off data recovery, just do it as root.


For some filesystems, you can specify that everything should be world-readable, or that every file should be owned by a particular user. First determine the volume and mount point of the Mac filesystem with the command df . in the Desktop directory; this displays something like

/dev/sdb4   123456  78901  23456  42%   /media/disk1

Make sure no process is using the Mac filesystem (this includes any shell that has its working directory on it), and run

umount /media/disk1
mount -o umask=022 /dev/sdb4 /media/disk1

umask=022 means that everyone can read everything. You could also use uid=ktrauberman (replace ktrauberman by your user name) so that every file is owned by you.

share|improve this answer
    
How do I switch to the root user while running from the live CD? I tried running the commands using sudo, but I encountered the same errors. –  Kyle Trauberman Aug 13 '10 at 15:48
    
@ktrauberman: Do you mean that sudo ls /media/disk1/path/to/Desktop fails? If so, could you add to your question the output of sudo ls -ld /media/disk1 /media/disk1/path /media/disk1/path/to /media/disk/path/to/Desktop (substitute the names as appropriate of course)? And please also copy-paste the error messages. –  Gilles Aug 13 '10 at 16:11
    
Hmm. Now that I think about it, I don't think I tried sudo with ls or cd. I will try this tonight and get back to you. –  Kyle Trauberman Aug 13 '10 at 17:23
    
Yep, that was it. I was able to sudo ls into the locked directory and then sudo cp the files out of it. Thanks! –  Kyle Trauberman Aug 14 '10 at 1:45

Try unmounting the filesystem and then remounting it from the command line with the -w option

something like

mount -w /dev/sbd4 /mnt/macdrive

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.