how to use a USB drive across Linux computers?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2015
    Location
    Location
    Posts
    62
    Linux (Fedora) Firefox 62.0

    how to use a USB drive across Linux computers?

    Hi,
    I want to use my USB drive for sharing files across multiple Linux installations (Fedora, Manjaro, Ubuntu, OpenSUSE).
    I thought ext4 could be the file system of choice but there's too much drama about permission and I'm not able to access across my computer systems except where I created the partition.

    PLEASE, which could be a possible solution so that every Linux system and EVERY user will be able to read/write and create directories on such USB drive? Should I ditch ext4 all together and go with NTFS?
    I'm surprised by how this "problem" hasn't been addressed yet with all the people that try to abandon Windows and Linux distros trying so hard to make the year of the Linux desktop happen
    Thanks!

  2. #2
    Join Date
    Apr 2015
    Location
    Location
    Posts
    62
    Linux (Fedora) Firefox 62.0

    Re: how to use a USB drive across Linux computers?

    I'm liking this but there's a big but:
    The only problem I might expect is that copying files to the USB stick will by default attempt to duplicate the file permissions of the original, which you don't want in this case.
    For example, if you create a file on System A with permissions -rw-r--r-- and copy it to the stick, then move the stick to System B with non-matching UID numbers. You can still read the file on System B, but you cannot overwrite it on the stick without first explicitly deleting or renaming the original file. But you can do that, as long as you have write access to the directory the file's in

  3. #3
    Join Date
    Jan 2005
    Posts
    110
    Linux Chrome 69.0.3497.86

    Re: how to use a USB drive across Linux computers?

    Fat32 formatted usb drives just make life simple.
    Server:Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |Ubuntu -16.04 LTS
    Desktop: Asrock 79 ext4 | Intel Xeon E2650 | 16GB DDR3 1600 | Fedora 28
    Laptop: Dell Inspiron I5 7567 | Intel Core i5 |8GB RAM |GTX 1050 | Ubuntu -16.04 LTS

  4. #4
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    6,292
    Linux Chrome 69.0.3497.92

    Re: how to use a USB drive across Linux computers?

    Quote Originally Posted by horizonbrave
    I'm liking this but there's a big but:
    Sir Mix-A-Lot likes it too

    sorry couldn't resist

  5. #5
    Join Date
    Aug 2012
    Location
    USA
    Posts
    37
    Linux (Fedora) Firefox 62.0

    Re: how to use a USB drive across Linux computers?

    Fat32 works with everything, as long as you dont hit the max file size.

  6. #6
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    15
    Linux Firefox 62.0

    Re: how to use a USB drive across Linux computers?

    The OP should have been a little more descriptive about what he is trying to do and why. So I will make a couple of assumptions.
    1 I will assume "USB Drive" is a USB thumb drive and NOT a SSD in an USB external enclosure.
    2 I don't know if this is for multiple personal computers or multiple computers for different people, like a SOHO situation.
    The OP does say "EVERY user will be able to read/write and create directories on such USB drive? " so I am going to assume different individual people.
    3 i don't know if the OP is just transferring files with the USB drive, or if different people are hooking up the drive, working on files or creating files then
    writing it back to the USB drive.

    If the OP is just transferring files, then as said above using FAT32 on the USB Drive would be absolutely the best.
    The OP said "I'm surprised by how this "problem" hasn't been addressed yet". This was addressed years ago when then computer industry
    agreed that as a convention all USB thumb drives would leave the factories formatted with FAT32 as default. Problem solved.

    If the OP is wanting to make files available to multiple people on multiple computers by moving the USB stick between computers,
    then a server would be the best solution.

    If a server is not a possibility, then the OP will have to try and juggle ownership and permissions. He/she could try adding all usernames to the users group.

    $ sudo gpasswd -a UserName users
    $ id UserName
    uid=1000(Username) gid=1000(UserName) groups=1000(UserName),998(wheel),985(users)

    I believe than all major Linux distros use 985 as the uid for users as convention. Then make all portable files
    be available to UserName as primary group and users as secondary group
    #chown UserName:users filename.
    Then if people with different usernames are denied access, then they would have users as the secondary group in common.
    Just make sure all files have read write and possibly execute permissions for both UserName and user
    $ ls -l
    -rw-rw---- 1 UserName users 868 Jun 28 18:05 filename
    However maintaining all the proper ownership and permissions would be troublesome.
    I try to think, but nothin' happens!

  7. #7
    Join Date
    Jan 2005
    Posts
    110
    Linux (Fedora) Firefox 61.0

    Re: how to use a USB drive across Linux computers?

    Quote Originally Posted by Sight
    Fat32 works with everything, as long as you dont hit the max file size.
    Absolutely. In the past I've formatted a usb drive ntfs in order to accommodate a dvd .iso transfer from a Windows machine to a Linux box.
    Server:Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |Ubuntu -16.04 LTS
    Desktop: Asrock 79 ext4 | Intel Xeon E2650 | 16GB DDR3 1600 | Fedora 28
    Laptop: Dell Inspiron I5 7567 | Intel Core i5 |8GB RAM |GTX 1050 | Ubuntu -16.04 LTS

  8. #8
    Join Date
    Jan 2015
    Location
    Al Ain, UAE
    Posts
    815
    Mac OS X 10.13 Firefox 62.0

    Re: how to use a USB drive across Linux computers?

    Ayup, as explained above, the best solution is to ensure that you have the same UID and GID on all machines, then you won't have any issues and can use any file system.

    The worst solution is to recursively chmod all files world read-write.

    The enterprise solution, is to install an authentication server such as yp, to ensure that you get the same credentials on all computers and only need to administer it in one place.
    --
    Have fun!
    http://www.aeronetworks.ca

  9. #9
    Join Date
    Apr 2015
    Location
    Location
    Posts
    62
    Linux (Fedora) Firefox 62.0

    Re: how to use a USB drive across Linux computers?

    Quote Originally Posted by hrsetrdr
    Fat32 formatted usb drives just make life simple.
    Aaargh, forgot to mention, it has to support 4 GB + files and file journaling wouldn't be too bad too

  10. #10
    Join Date
    Jan 2015
    Location
    Al Ain, UAE
    Posts
    815
    Mac OS X 10.13 Firefox 62.0

    Re: how to use a USB drive across Linux computers?

    "4 GB + files and file journaling" So fix your UIDs and GIDs so they are the same everywhere and use a proper file system.
    --
    Have fun!
    http://www.aeronetworks.ca

  11. #11
    Join Date
    Apr 2018
    Location
    Finland
    Posts
    97
    Linux (Fedora) Chrome 68.0.3440.106

    Re: how to use a USB drive across Linux computers?

    Quote Originally Posted by horizonbrave
    Aaargh, forgot to mention, it has to support 4 GB + files and file journaling wouldn't be too bad too
    Doesn't exFat fix that max filesize problem?

  12. #12
    Join Date
    Jul 2010
    Location
    western PA
    Posts
    155
    Linux (Fedora) Firefox 61.0

    Re: how to use a USB drive across Linux computers?

    I still use ext2 for just about anything removable, and I deal with permission problems as they come up...but I do all my copies as root, and if it's a complicated copy then I create a tarball and just copy the tar. I'd stay away from ntfs, as it makes me "uneasy".

Similar Threads

  1. Exchanging Hard Drive between Computers...
    By refuzer in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 5th November 2009, 12:38 AM
  2. Sharing data on usb drive across multiple computers
    By daviddoria in forum Using Fedora
    Replies: 7
    Last Post: 16th December 2008, 01:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •