Fedora Linux Support Community & Resources Center
  #1  
Old 19th March 2017, 04:01 PM
idude Offline
Registered User
 
Join Date: Jun 2011
Posts: 41
linuxfedorachrome
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?
Reply With Quote
  #2  
Old 19th March 2017, 04:15 PM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 7,472
linuxchrome
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.
Reply With Quote
  #3  
Old 19th March 2017, 05:02 PM
idude Offline
Registered User
 
Join Date: Jun 2011
Posts: 41
linuxfedorachrome
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
Reply With Quote
  #4  
Old 19th March 2017, 05:15 PM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 7,472
linuxchrome
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.
Reply With Quote
  #5  
Old 19th March 2017, 05:36 PM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 7,472
linuxchrome
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:
Quote:
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.
Reply With Quote
  #6  
Old 19th March 2017, 05:42 PM
idude Offline
Registered User
 
Join Date: Jun 2011
Posts: 41
linuxfedorachrome
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.
Reply With Quote
  #7  
Old 19th March 2017, 05:49 PM
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 7,472
linuxchrome
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
Quote:
By the way I do have RW permissions because I already tested it manually
Tested it as a regular user? As another user?
Reply With Quote
  #8  
Old 19th March 2017, 06:07 PM
idude Offline
Registered User
 
Join Date: Jun 2011
Posts: 41
linuxfedorachrome
Re: Mounting a USB drive

Got it, Thanks!
Reply With Quote
Reply

Tags
drive, mounting, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Mounting A ZFS Drive nicco Using Fedora 1 12th February 2016 03:48 AM
Mounting USB Drive caynes_linux Hardware & Laptops 23 17th September 2009 10:15 PM
Mounting old drive after installing on a new drive durangowildlife Installation, Upgrades and Live Media 2 16th September 2005 05:39 AM


Current GMT-time: 08:58 (Thursday, 27-04-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat