2014/1/2 Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
On 02/01/14 23:02, Chris Stankevitz wrote:
> Hello,
>
> Please consider a USB "stick" that is unformatted but is to be used by
> multiple people/machines.  Ideally your instructions will work for all
> people/os/WM, but if necessary please assume that everyone is running
> gnome under linux

Well, if it ideally should work across multiple operating systems,
you're probably stuck with FAT32 or similar due to Windows.

> 1. How should I prepare this device so that it can be plugged into any
> machine and will be writable by anyone?  I suspect the answer will
> involve words like fdisk, mkfs.xxx, mkdir/mount, chmod/chown.  I'm
> most interested in the chmod/chown part.

If you go with FAT, there's no notion of ownership (I believe) so it's
not a problem. If you don't, I still don't think chmod/chown matters
as long as the user has the permissions to write to the stick when
mounted on their own machine. I might be wrong though!

> 2. How can I prepare the device so that files/directories added by
> people in the future will continue to be writable by anyone?

Likewise, I think they'll be able to as long as they have the
permission to write to the mounted stick _on their own machine_.

> 3. How can I ensure that all files will appear to have the same owner;
> or, if this is not important, can you explain why it should not be a
> problem.

I think it's not a problem, at least not with FAT.

> And of course if you can refer me to a document that explains this I'm
> happy to read it.
>
> Thank you,
>
> Chris
>

I'm not an expert but hopefully this helps to at least steer you in
the right direction. I used multiple USB sticks across multiple
machines across multiple systems in the past and I never had any
ownership concerns that you do. The only issues were if one of the
systems couldn't read the file format used.

--
Mateusz K.



As far as I know, in a Gentoo system, any user in the group "disk" will be able to read/write to any USB stick plugged into the computer, with no ownership to any written file. In Linux (at least), as users are internally treated as numbers, those would not match from one system to another, so there is no meaning in a user owning a file in a removable device.

I would suggest to format tat USB stick using NTFS, as it will be possible to use its compression (to write a compressed file is, AFAIK, exclusive to Windows, but any NTFS file, compressed or not, is readable under Linux - including Android, I already tested it, and also my Blu-Ray player with USB connection is able to read my NTFS formated USB stick).

Hope this helps
Francisco