You are not logged in.

#1 2014-03-06 19:47:29

cogeary
Member
Registered: 2012-09-16
Posts: 22

Partition sharing with OSX

Hi there,

I'm wrapping up an installation of Arch alongside OS X on macbook pro (11,1), and I'm trying to set up a partition for any sort of file sharing between the two OSes. Right now I'm using HFS+ without journaling for that partition, and the issue I'm facing is permissions. I've been reading up a lot but I still don't fully understand DAC permissions, so hear me out.

First off, the default OSX UID is 501, and the default OSX group is called "staff" with GID 20. Here's the full output of id:

uid=501(cove) gid=20(staff) groups=20(staff),401(com.apple.sharepoint.group.1),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)

Every guide I've found suggests to sync the UIDs and GIDs between the two OSes. Let's ignore, for a second, the fact that this just feels like a really hacky way to solve everything and it might lead to permission issues if done incorrectly. If I were to go with this solution, I would not want to change the Arch G/UIDs. AFAIK many distros reserve the <4 digit UIDs for system users. I'm not sure what the specific implications for Arch are, but it's not something I want to get used to doing. It's a similar argument for GID, especially because it looks like 20 might be reserved.
However, I wouldn't want to go about changing G/UIDs in OSX, either. This is mainly just because OSX doesn't like being rubbed the wrong way, so I don't trust that I won't break anything (or everything) by changing the G/UIDs on an existing user.

That said, let's remember the fact that that feels like a really hacky way to solve everything and it might lead to permission issues if done incorrectly. Certainly there is a more convential way to do this; how can multiple users on different OSes collaborate on the same files?

Or perhaps, if that's delving too deep into the metaphysical world of Linux, we could take a step back and think about the filesystem used. Would something like NTFS be better suited for my uses, both in terms of performance and correct (or nonexistent) use of permissions?

Thanks.

Offline

#2 2014-03-06 19:50:51

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Partition sharing with OSX

NTFS isn't an OS X filesystem is it?  Is OS X using FreeBSDs ufs?  Have you tried fuse?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2014-03-07 00:15:36

cogeary
Member
Registered: 2012-09-16
Posts: 22

Re: Partition sharing with OSX

nomorewindows wrote:

NTFS isn't an OS X filesystem is it?  Is OS X using FreeBSDs ufs?  Have you tried fuse?

Oops, you are right. Natively and officially, OS X supports NTFS ro. You can specifically mount it rw, but I don't know how stable it is. However, you can download and build ntfs-3g and osxfuse for OS X. It was simple enough using homebrew (a package manager), but I haven't tested it to see how it works. It looks like it respects permissions and ownership (see docs).

I don't know much about UFS, but from what I understand OS X does support it.
How can fuse help me?

Thanks for the response.

Offline

#4 2014-03-07 01:07:52

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Partition sharing with OSX

OS X or one of them is based on FreeBSD, which uses ufs.
If OS X is actually using ufs, it can be mounted under the stock Arch kernel, ro:

mount -t ufs -o ufstype=ufs2 -o ro /dev/xxxx /mnt/wherever

Look up the wiki on fuse.
NTFS is ported to unix and with xattr can possibly respect NTFS permissions, but for the most part NTFS under unix is limited by unix.  Not that this is a problem.  Unix just can use any number of filesystems and is not totally limited as a commercial OS.  How it operates under unix is separated from the actual implementation of each OS it was designed for.

Last edited by nomorewindows (2014-03-07 01:11:17)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#5 2014-03-07 12:43:22

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Partition sharing with OSX


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2015-02-11 17:11:58

Gamonics
Member
From: Rhode Island, USA
Registered: 2015-02-10
Posts: 40
Website

Re: Partition sharing with OSX

Lone_Wolf wrote:

Bummer: linkrot. Lone_Wolf any chance you'd like to elaborate on what this article would have taught me?

I kind-of agree with the OP that forcing either Arch or OSX to use something other than their default UIDs and GIDs seems likely to cause subtle problems later. What are other people doing along these lines to ease file sharing between the two OSes?

Offline

#7 2015-02-11 17:27:25

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Partition sharing with OSX

OS X uses its own HFS filesystem (HFS+ for journaling). You should be able to mount an HFS filesystem under Arch using hfsutils from the AUR. However, I'd strongly recommend caution when sharing data between operating systems on a single partition. Mounting HFS read-only will probably be fine, but that's as far as I'd be willing to go. The only non-native filesystem I'd entrust any vital data to is FAT, which has its own limitations (including a lack of file permissions).

Offline

#8 2015-02-11 17:41:58

Gamonics
Member
From: Rhode Island, USA
Registered: 2015-02-10
Posts: 40
Website

Re: Partition sharing with OSX

Thanks for sharing your thoughts ANOKNUSA. I'll try hfsutils.

But having studied this issue a bit more fully now, I guess the Arch wiki guidance to add new users using the OS X UID and GID seems ok to me.

In fact, I wonder if it might be a good idea to adjust the Arch default values of UID_MIN in /etc/login.defs from 1000 to 501, and maybe do something similar with GID_MIN, so additional user accounts I create in both OSX and Arch share common UIDs. Anyone see any problems doing something like that?

Offline

#9 2015-02-12 09:52:07

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Partition sharing with OSX

Gamonics wrote:
Lone_Wolf wrote:

Bummer: linkrot. Lone_Wolf any chance you'd like to elaborate on what this article would have taught me?

I kind-of agree with the OP that forcing either Arch or OSX to use something other than their default UIDs and GIDs seems likely to cause subtle problems later. What are other people doing along these lines to ease file sharing between the two OSes?

I found the page on the wayback machine

It has a (old ?) list of fileystems supported by OS X.

Last edited by Lone_Wolf (2015-02-12 09:52:24)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB