LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   to write to HFS+ ( mac) (https://www.linuxquestions.org/questions/general-10/to-write-to-hfs-mac-863040/)

zimbot 02-16-2011 07:27 AM

to write to HFS+ ( mac)
 
friends,

I am currently able to mount a HFS+ ( mac osx ) formatted usb drive for reading.
My googleing seems to lead me to believe that I cannot , as in never , be able to mount such an animal and be able to write to it.
[ i am monting USB drives and backing them up to LTO4 data tapes ]
I would like to be able to
"sanitize' the permissions on the mac drive
chmod 777 -R "yeOlMacDrv" and also
write a drv list back to the drive
ls -altR >> /media/yeOlMacDrv/JobNum.txt

so basically my kernel ( OPENsuse 11.4 ) must have been built with the HFS util -- cause i CAN read it.

Is it true no LINUX solution for mounting for writing exists?

and if it is possible -- how?

thanks

zimbot 02-16-2011 08:33 AM

i did see this ref to hfsprogs

//-fragmnet

I still couldn’t get write access without that warning. I tried loading the hfsplus module and then adding it to /etc/modules to see if that would make a difference. As I expected, it didn’t. I was almost ready to give up but there was another HFS package in the list that, even though it seemed unrelated to what was trying to do, seemed worth a shot:

hfsprogs - mkfs and fsck for HFS and HFS+ file systems

It worked! I have no idea how or why (and I’m not interested enough to figure it out), but after installing the hfsprogs package I was able to mount my HFS+ partition with write access.

xeleema 02-16-2011 08:42 AM

Greetingz!

Check to see that you have the "HFSplus" kernel module loaded. If the HFS+ filesystem is non-journaled, you should be able to mount-up HFS+ filesystems read-write that way. However, as that's an "EXPERIMENTAL" module, I wouldn't explicitly trust it.

Depending on how you're backing these up to tape, there might be a better way to change the permissions. For instance, tar has a few options you might find interesting;

Interesting Options from GNU Tar's ManPage
Code:

-o, --no-same-owner
    do not attempt to restore ownership when extracting; -o exhibits this
    behavior when extracting an archive
--no-xattrs
    this option causes tar not to store each file's extended attributes
    in the archive and not to extract any extended attributes in an archive.
    This option also enables --no-acls and --no-selinux if they haven't
    been set already.
--owner USER
    change owner of extraced files to USER


zimbot 02-16-2011 01:51 PM

i am able to mount for reading

so i am thinking that i do have hfs plus & hfs utils built into my kernel

the drive mounts automagically
under /media/RightHereMacDrv

my difficulty is when I do a
ls -Rlh >> /home/buUser/bu_list/${jobNum}.txt
( where jobNum is a string read from standard in ..i type in the number.
to get a problem of not being able to go down into some dir

I wonder if i actually AM able to print those 'permission denied' dir to the tape
when i do a
sudo tar --totals -H pax -cvf /dev/st0 *

i suppose i could do a tell
sudo tar -tvf /dev/st0
and see
iether way my text listing is without all the info.


All times are GMT -5. The time now is 04:34 PM.