# Messing with uids to aid in sharing of disk.

## Nicias

I have a media driver I share between two computers. One is my gentoo laptop and the other is my Mac. I have the same username on both machines, but different ids. On the Mac my uid is 501 and files are created owned by nicias : staff by default (#''s 501 : 20 ) On my laptop,  I'm nicias : nicias (1000 : 1000.) This causes trouble when I attempt to access the drive from the laptop. I have to use root access to do so, and then chown the files to 501: 20 when I'm done. 501 is untake, and 20 is "dialout" whatever that is.  This is a minor inconvience.

My thought is the following. I could change my uid on the gentoo box to 501, but that seems risky. Seems like that is not-real-person territory.  

Another option is to create a dummy user with that uid and add myself and them to this "dialout" group (gid 50) and then set the setgid and setuid bits on the directories on the disk, the files in question are all group readable, and the directories group writable, since another user has to use them on the Mac.

Any reason why this won't work or why I shouldn't do this?

----------

## krinn

why don't you usermod your user to grab that uid/gid ?

look for -u & -g (-G too)

you can also pass uid/gid to the mount point

or you can higher then on your mac too.

I'm not sure, but i don't think anyone care about having a minimal value for gid/uid (except maybe 0), just that using 1000 and 100 are a convenient rule to see who is human and who is a robot/service but not an hardened need.

----------

## Spidey

Do you actually need permissions on a removable drive?

----------

## Nicias

Well, I don't know. I'm mounting it with truecrypt, so until I did something else, it was mounting as root on my mac, which wasn't very helpful.  I'm not sure what my other option is. It is a hfsplus volume, so it knows about unix permisions. If I don't jiggle with the uid's, don't I have to mount it as root on my gentoo machine?

----------

