Friday, July 26, 2019

sharing an ext3/ext4 partition on external drive



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!


Answer



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.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...