USB mounting automatically : users option?

Brian McKee brian.mckee at gmail.com
Tue Mar 3 14:37:11 UTC 2009


On Tue, Mar 3, 2009 at 6:30 AM, Alan E. Davis <lngndvs at gmail.com> wrote:
> I have a git repository on a USB flash drive.  Two or more users (all of
> them me, at this point) on various machines need to have read and write
> permissions on this repository.  I have run into problems due to different
> user numbers, as the owners and groups on the USB drive are numbers only,
> unless originating on the machine the drive is mounted on.  I think this is
> how it works.

Owners and groups are actually numbers UIDs and GIDs - always.  The
text is just a label for humans.
So, if a file is owned by user 500, it checks the /etc/passwd file,
and sees user 500 has name 'fred' and displays 'fred' on the screen.
If you take that drive to another computer that doesn't have a user
500, it just prints 500.  If that other computer has a user 500 called
john - it prints John on the screen.

Perhaps it would be helpful to create a group called 'gitusers' or
something, with a specified group number of say 5555 or whatever on
every computer you want to hook that drive up to.

Brian




More information about the ubuntu-users mailing list