is there a way of sharing an ext3/ext4 formatted partition on an external USB drive between different users (uids) on different Linux machines without creating a group for this purpose, setting the group ownership of the partition to this group and adding each respective user to the group on every machine?

This would mean that I need to have root privileges on every machine... which I may not have in some cases.

I'm using the partition to store the code I'm developing on Linux and I would like the option to be safe... if possible.

I could use a vfat partition but then I have no control of the rw rights + I cannot develop directly in the dir: I would always have to tar.gz the directory, extract, work, tar.gz, copy to the external drive... and so on.

Thanks!

link|improve this question
What kind of permissions should users have in the shared directory? – MonkeeSage Aug 30 '11 at 15:23
feedback

1 Answer

up vote 0 down vote accepted

The general answer is "no". uid and gid on the filesystem will be as set at the moment of the write and if they don't match on a different machine, then privileges won't match either.

If you do not want to make a small revolution with uids/gids on several machines, you could try using acls to set the desired permissions for all desired users on all machines. I suspect this will use numerical uids internally, so it could happen, that giving access to your account foo on machine A, uid a, will give access to your files to a random guy bar on machine B, uid a. It also seems like it's more hassle than it's worth.

I think that saner approach would be to use tar to migrate your development tree.

I have also had a half-baked idea of carrying around a Subversion repository (with files writable only to root and appropriate access configuration files), and relying on svn server being present on all machines which you are going to use, but I do not think it's excessively sane.

link|improve this answer
Thanks a lot for the answer! So, the right way to go is then to use vfat as the filesystem to get around the permissions, and tar.gz my directories? – tomislav-maric Aug 31 '11 at 7:31
vfat/ntfs (because they will have automagically set uid to your own upon file system mount) or extN with a world-writeable directory. It is really ironic, to use Windows file system to move data between Linuxes. – PaweÅ‚ Brodacki Aug 31 '11 at 8:44
"It is really ironic, to use Windows file system to move data between Linuxes." :) It's kind of sad, yes. This is why I wanted to investigate other options in the first place. Thank you very much for your help! – tomislav-maric Aug 31 '11 at 10:35
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.