Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Access to HFS+ partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Jan 07, 2009 12:46 pm    Post subject: Access to HFS+ partition Reply with quote

Morning everybody.

I wish my user could access to an hfsplus partition with the same permission that MAC OS X assigns.

Let me explain better.

IDs:
OS X user ids are: uid=501,gid=80
in gentoo are:

uid=1000(elbryan) gid=1000(elbryan) gruppi=10(wheel),14(uucp),18(audio),19(cdrom),27(video),35(games),85(usb),100(users),1000(elbryan),1002(haldaemon),1003(plugdev)

ls -lha into the mounted partition gives me:

drwx------ 1 501 cdrw 16 21 nov 19:50 universita

Obviously the gentoo's user can't access on that directory.
Is it possible to append an optiono during the mount to define that uid 501 would math with 1000 and when my gentoo user will write a file (with uid 1000) it will be stored as 501? Same thing for the gid?

My mount options are the following:

/dev/sda3 on /mnt/macdati type hfsplus (rw,uid=1000,gid=1000)

related fstab row:

/dev/sda3 /mnt/macdati hfsplus auto,rw,uid=1000,gid=1000 0 0


and /mnt/macdati dir has the following permissions:


drwxrwxr-x 1 elbryan elbryan 24 3 gen 11:48 macdati


Really sorry for the quite bad explanation.. I hope someone will give me some advices.

Bye!
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Wed Jan 07, 2009 4:11 pm    Post subject: Reply with quote

No matter with what UID or GID you mount it, HFS+ handles file permissions like other UNIX FSs, means all directories and files inside your macdati mountpoint can and do have other permissions.

Possible solutions are:
- change your user's UID on the Mac side to 1000
- change your user's UID on the Linux side to 501
- adjust the file/directory permissions, for example by creating a group on both systems with identical GID (or just use that cdrw group if it's a single user system), and chmod 750 or 770 the directory.

Take care with last one though, maybe only set the directories you need to access to 750, and selectively make the files inside readable to the group. A chmod -R 750 on the whole dir is a bad idea for sure.
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Jan 07, 2009 4:58 pm    Post subject: Reply with quote

As long as I thought I have to change my user UID.

[Polemic mode ON]
Is ethically correct that OS X uses a "common" GID for the user? This could drive into a security issue or am I on a wrong track?
[Polemic mode OFF]

One last question. What's the correct way to change my linux's user UID?

Thanks :)
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Wed Jan 07, 2009 7:17 pm    Post subject: Reply with quote

I synchronize gid's for NFS permissions all the time. I don't think there is anything wrong with that.
I've synced UID's too, but that probably isn't necessary here.
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Jan 07, 2009 7:21 pm    Post subject: Reply with quote

coolsnowmen wrote:
I synchronize gid's for NFS permissions all the time. I don't think there is anything wrong with that.
I've synced UID's too, but that probably isn't necessary here.


As "common" I meant the cdrw group (that uses 80 as GID).
I thought there were a standard for these kind of things :)


Last edited by Elbryan on Wed Jan 07, 2009 8:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Wed Jan 07, 2009 8:09 pm    Post subject: Reply with quote

GID's are Probably standardized across linux distributions, but OSX is a different animal.
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Wed Jan 07, 2009 9:54 pm    Post subject: Reply with quote

Elbryan wrote:
One last question. What's the correct way to change my linux's user UID?

usermod -u <new ID> <username>
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Jan 07, 2009 11:43 pm    Post subject: Reply with quote

Thank you very much, both of you :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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