[Discuss] USB thumbdrive, Linux only usage: FAT vs NTFS vs other? TRIM support?

Matthew Gillen me at mattgillen.net
Tue Feb 26 19:08:14 EST 2013


On 2/25/2013 10:19 PM, Tom Metro wrote:
> Matthew Gillen wrote:
>> Create a single directory in the root of the thumb drive, and give that
>> world-write and group-write, then give it set-group-ID bit ('chmod g+s
>> dirname').
>>
>> Every file created will inherit the group-id of the original directory...
> 
> How does that help if the numeric GIDs vary from machine to machine?

It doesn't matter.  The files (even new ones you're attempting to write)
always inherit the GID of the parent dir. It's just an integer.  True,
it won't map to a readable name on some systems (or map to a different
name), but the display name of the group doesn't matter, and won't stop
you from reading and writing.  The permission system is based on the
integer values.

The useful aspect here is that the system assumes all possible group IDs
are valid.  They don't have to "exist" locally (e.g. in /etc/group) on
the current system for the filesystem to enforce permissions based on them.

Matt



More information about the Discuss mailing list