I've come up with a simple, decent workaround to this problem that I'd
like to share.  It won't help everyone in all cases, but it's a lot
better than nothing ;)

For months now I have been pondering how to easily transport, say,
important configuration files (in ~) from one Ubuntu computer to
another, using a VFAT/FAT32 USB flash drive.  It's quite tricky.  Let me
illustrate:

I want to use VFAT on the flash drive so that all files are also easily
accessible in Windows.  But VFAT does not store the meticulous Unix-
style permissions required for many configuration files.  So for
example, you get in trouble if you want to copy your ~/.gnupg files from
one Ubuntu machine to the other (using a VFAT USB flash drive to
transport the files), because the file permissions get mangled from
being -rw------- to -rwx------.  Similarly, any file having -rw-r--r--
gets mangled to being -rwx------, and any directory having drwxr-xr-x
gets mangled to drwx------.

If you use ext2, ext3, or reiserfs as the filesystem on your USB flash
drive (to save these permissions), then you can still get into
"permission trouble" because you may not have the same UID on both
Ubuntu machines.  And accessing ext2, ext3, or reiserfs from Windows is
very non-trivial at best, dodgy at worst.

The best solution for propagating any "permission-sensitive" files, like
the ~/.gnupg config files in this example (to another Ubuntu machine)
seems to be to store them in a tar file on the VFAT USB drive.  The tar
file does store the file permissions properly!  Gnome's "File Roller" is
very smooth and is well-integrated into Gnome/Nautilus (eg. from context
menus): it's all point-and-click.  Whee!  And, when files get untarred,
they take on whatever UID you have at the time, so the UID problem goes
away too (i.e. UIDs possibly not being the same on two Ubuntu machines).
Plus, a tar file is easy to work with from Windows using a free tool
like 7zip.

This workaround still leaves the annoying problem that when you copy
"regular" files (ie. not "permission-sensitive" files) from the VFAT
Flash drive (ie. that weren't stored in a tar files), they will have the
mangled -rwx------ permissions.

-- 
can't easily use unison-gtk to sync a local folder to my VFAT USB drive
https://bugs.launchpad.net/bugs/118283
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to