View previous topic :: View next topic |
Author |
Message |
DZoom Tux's lil' helper

Joined: 13 Jun 2010 Posts: 79
|
Posted: Sun Jul 10, 2011 6:15 pm Post subject: [CLOSED] read/write hfsplus as gentoo user (macbook pro 8,1) |
|
|
hi,
i successfully installed gentoo on one of the latest 13" macbook pros.
gentoo itself runs relatively smooth, but i want to access the hfplus partition housing Mac OS X.
so i turned off journaling from the mac os x partition and now i'm able to mount the mac os x partition as read-write partition from gentoo - but only as root
does anyone know how i can access files (meaning read & write support) on the mac os x partition as user?
corresponding fstab line for automatically mounting the hfsplus partition:
Code: | /dev/sda2 /mnt/mac hfsplus rw,noatime,user 0 2 |
Last edited by DZoom on Mon Jul 18, 2011 5:02 pm; edited 1 time in total |
|
Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Sun Jul 10, 2011 8:33 pm Post subject: |
|
|
IIRC user expects an argument, which use should be allowed, in contrast users allows all users to mount it.
V. _________________ read the portage output!
If my answer is too concise, ask for an explanation. |
|
Back to top |
|
 |
DZoom Tux's lil' helper

Joined: 13 Jun 2010 Posts: 79
|
Posted: Sun Jul 10, 2011 8:42 pm Post subject: |
|
|
Veldrin wrote: | IIRC user expects an argument, which use should be allowed, in contrast users allows all users to mount it.
V. |
according to the mount manual you are wrong:
Quote: | Normally, only the superuser can mount file systems. However, when fstab contains the user option on a line, anybody can mount the corresponding system.
Thus, given a line
/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 file system found on his CDROM using the command
mount /dev/cdrom
or
mount /cd
For more details, see fstab(5). Only the user that mounted a filesystem can unmount it again. If any user should be able to unmount, then use users instead of user in the fstab line. |
i'll give it a try and update this topic if it works. but atm i don't expect it to have the proper effect...
*UPDATE*
tried it, but there's no change in behavior. still can't read files from my mac os x user as gentoo user  |
|
Back to top |
|
 |
DZoom Tux's lil' helper

Joined: 13 Jun 2010 Posts: 79
|
Posted: Mon Jul 18, 2011 5:02 pm Post subject: |
|
|
I tried the following two things:
1. use mac os uid when mounting (default: 501)
as understood from the mount manual hfsplus specific section:
edited the line that corresponds to my hfsplus partition in /etc/fstab:
Code: | /dev/sda2 /mnt/mac hfsplus rw,noatime,user,uid=501,gid=20 0 2 |
didn't work as it seemed not to mount the partition as user with uid 501 (which was what i expected and what i understood from the manual should happen).
result:
-still couldn't write to mac partition
would have been to easy...
2. change linux uid to mac os x uid
found this hack somewhere:
- in linux, log in as root
- change your uid to match the one of your mac os x user (501 in my case):
Code: | usermod --uid 501 yourusername |
- adapt the permissions of your linux home directory
Code: | chown -R 501:yourusername /home/yourusername |
result wasn't as i expected:
result:
- from linux i could read/write onto the mac os x partition
- from mac os x i could read the files i created/copied from within linux
- i was not able to delete those files from mac os x. didn't try writing as the lack of file deletion was unacceptable for me
maybe these sites help someone who stumbles over this topic:
https://www.ohloh.net/p/ext4fuse
http://lifehacker.com/5702815/the-complete-guide-to-sharing-your-data-across-multiple-operating-systems
workaround
i don't see an easy way of one file system (be it ext4 or hfs+) being mounted in the "other" OS or vice versa.
i'm going to shrink my linux partition, create an ntfs partition and use it as common partition for linux and mac os x. one reason is, that both os versions i got installed support writing to ntfs (as i need that regularly). if i remember correctly, ntfs doesn't use/care about/understand unix file permissions - which might be the reason why ntfs will work... |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|