I have two computers: home and work. I have set these up pretty similarly (although home is Linux Mint 13 and work is Ubuntu 11.10). Assume my account name at work is "me_work" and my account name at home is "me_home".
I use a USB drive to share files from one computer to the other. I have written a script which mounts different directories of that drive to different directories on each system. For example, I do something like:
mount --bind /media/USB/MyProject $HOME/Projects/MyProject
As I work, on either computer, I do stuff in $HOME/Projects and this all gets saved on the USB drive. If I swap the USB drive out from one computer to the other, the files are all still there.
But there's a problem.
If I create a file while on my work computer it will be owned by the user "me_work" and the associated group "me_work". If I try to play with that file on my home computer I fail b/c I don't have permission to modify them. Furthermore, the "me_work" user or group are not known on my home computer.
Now, I could just
sudo into everything, but I'm not always using a terminal - sometimes I'm doing stuff on a webserver, sometimes I'm using an IDE, etc.
How can I set things up so that the contents of the USB drive are readable by both my accounts? I have tried adding a new group to both computers called "me_usb" and setting both accounts to be members of that group. Then setting the gid of the directories on the USB to "me_usb" and making them group-writable. Unfortunately, that had no effect.