6

I often need to move files between two Linux computers via USB. I use gparted to format the USB's. When I formatted the USB to use FAT32, the USB was unable to copy symlinks, so I had to recreate the symlinks on the other computer after copying the files. When I formatted the USB to use EXT3, I created a lost+found directory on the USB, and prevented me from copying files to the USB unless I became root.

  • Is there a preferred file system to use when transferring files between two Linux computers?
  • How can I copy files without running into the problems presented by the FAT32 and EXT3 filesystems?

3 Answers 3

6

What I do is to store tarballs on the USB drive (formatted as VFAT). I'm wary of reformatting USB drives, they are build/optimized for VFAT so to level wear, and I'm afraid it will die much sooner with other filesystems. Besides, formatting another way will make it useless for ThatOtherSystem...

3

"It's not a bug, it's feature..."

It would be quite evil if every unprivileged user could write to every Linux file system just because he feels entitled to. You must explicitely allow him to. After creating a file system only root is allowed to.

# You (as root) can either give write write access to everyone:
chmod 777 /mount/point
# or you give the whole file system to the user
chown user /mount/point

But you will run into problems on the other system with a Linux file system if the user IDs on both systems don't match. Thus it may be useful to create the files and directories in a way that everyone can at least read them.

It may be better in this case to use an archive program instead.

3

One option would be UDF.

UDF, the Universal Disk Format, is an ISO standard originally designed for DVDs, but it is perfectly usable for USB sticks. It also supports POSIX permissions, with one killer feature for removable media: a file can belong to no specific person or group [...] your USB stick will be usable for reading and writing with GNU/Linux and the other free operating systems of course, but also with current versions of Windows (read-only with the outdated version XP) and with MacOS.

-- Using the UDF as a successor of FAT for USB sticks, by Tanguy (2013-01-30)

The full-text article with a short tutorial is found here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .