FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2011
    Posts
    41

    Mounting a USB drive

    Something I haven't been able to figure out yet. I'm running F25 and it looks like all my flash drives mount at /run/media/ecerejo/"dir" but I have a flash drive that I would like to mount at /mnt/"dir" and give full permissions to every user, how do I do this manually and automatically?

  2. #2
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,566

    Re: Mounting a USB drive

    You should be able to do this with an entry into your /etc/fstab file. Since it's a USB device, the /dev/sdxx can change, so use UUID or LABEL of the device instead. See "man fstab" for basic format, and just look at the format of existing entries in the fstab file for reference.

    Also, set "permissions" level on the mount point, /mnt/<mount-point> to allow rw by everyone.

  3. #3
    Join Date
    Jun 2011
    Posts
    41

    Re: Mounting a USB drive

    From reading about it, I'm still not sure, here's what I got on that file and I'm thinking in adding the last line to it. Do I have it correct?


    #
    # /etc/fstab
    # Created by anaconda on Wed Feb 15 14:16:28 2017
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    /dev/mapper/fedora-root / ext4 defaults 1 1
    UUID=a3c62386-6627-4168-9637-9ba363ce57a1 /boot ext4 defaults 1 2
    UUID=1BF2-D959 /boot/efi vfat umask=0077,shortname=winnt 0 2
    /dev/mapper/fedora-home /home ext4 defaults 1 2
    /dev/mapper/fedora-swap swap swap defaults 0 0

    /dev/sdd1 /mnt/emby ntfs defaults 0 0

  4. #4
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,566

    Re: Mounting a USB drive

    Well, if the USB device /dev/sdd1 is indeed formatted with ntfs, then yes. But you are ignoring my advice to use either the UUID or LABEL of the device rather than the /dev/sdd1 identifier. The UUID and LABEL of that device will not change, but the sdxx can change on USB devices between reboots depending on which USB devices are plugged in at the time.

    Use the blkid command to find the LABEL and UUID of /dev/sdd1. Also, I prefer to use filesystem type of ntfs-3g over just ntfs, though these days, it might not make much difference.

  5. #5
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,566

    Re: Mounting a USB drive

    If changing permissions on the mount-point directory don't give users rw permission, you may need to add some options to fstab entry for that device. Reviewing the "man mount" manual, under "Mount options for ntfs", there is:
    uid=value, gid=value and umask=value
    Set the file permission on the filesystem. The umask value is given in octal. By default, the files are owned by
    root and not readable by somebody else
    .
    So using "-o rw,umask=####" might be necessary, or not. umask is a bit tricky as it's just the inverse of what you would use by using the chmod command to alter privilege levels. So if 6 sets read and write permission in chmod, 1 would do the same in umask.

    Another option is to use the gid= option, setting it some group you have created and then made all the users a member of that group.
    Last edited by PabloTwo; 19th March 2017 at 05:54 PM.

  6. #6
    Join Date
    Jun 2011
    Posts
    41

    Re: Mounting a USB drive

    I've got this 94B0397BB03964C0 for UUID, how would I change that line using this ID? By the way I do have RW permissions because I already tested it manually and my filesystem is NTFS.

  7. #7
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,566

    Re: Mounting a USB drive

    Instead of using /dev/sdd1 in the fstab file, use:

    UUID=94B0397BB03964C0

    You can confirm the correct and corresponding uuid (with the device plugged in) with:
    Code:
    ls -l /dev/disk/by-uuid
    By the way I do have RW permissions because I already tested it manually
    Tested it as a regular user? As another user?

  8. #8
    Join Date
    Jun 2011
    Posts
    41

    Re: Mounting a USB drive

    Got it, Thanks!

Similar Threads

  1. Help Mounting A ZFS Drive
    By nicco in forum Using Fedora
    Replies: 1
    Last Post: 12th February 2016, 04:48 AM
  2. Mounting USB Drive
    By caynes_linux in forum Hardware & Laptops
    Replies: 23
    Last Post: 17th September 2009, 10:15 PM
  3. Mounting old drive after installing on a new drive
    By durangowildlife in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 16th September 2005, 05:39 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
  •