[nmglug] change permissions on USB drive
    Nick Frost 
    nickf at nickorama.com
       
    Fri Oct 12 12:44:12 PDT 2007
    
    
  
Nick Frost wrote:
> You can also emerge, apt-get, or yum sudo for your distro and then edit 
> /etc/sudoers with visudo to allow mounting of a USB drive if you have 
> problems, though a correct /etc/fstab entry for the relevant /dev/sd<x> 
> device ought to do it.
You will note from below output of dmesg that if I insert a USB flash 
drive, it's identified as /dev/sdd (because I have a RAID-1 set of 
/dev/sda and /dev/sdb, and a third drive as /dev/sdc)
----------------------dmesg output--------------
usb 1-5: new high speed USB device using ehci_hcd and address 4
usb 1-5: configuration #1 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
   Vendor: Flash     Model: Drive AL_USB20    Rev: 1.00
   Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sdd: 1005312 512-byte hdwr sectors (515 MB)
sdd: Write Protect is off
sdd: Mode Sense: 03 00 00 00
sdd: assuming drive cache: write through
SCSI device sdd: 1005312 512-byte hdwr sectors (515 MB)
sdd: Write Protect is off
sdd: Mode Sense: 03 00 00 00
sdd: assuming drive cache: write through
  sdd: sdd1
sd 6:0:0:0: Attached scsi removable disk sdd
usb-storage: device scan complete
--------------------------------------
if I do;
  sudo fdisk -l /dev/sdd
Disk /dev/sdd: 514 MB, 514719744 bytes
6 heads, 21 sectors/track, 7978 cylinders
Units = cylinders of 126 * 512 = 64512 bytes
    Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               2        7979      502539+   6  FAT16
that tells me the USB stick partition I want is /dev/sdd1, which is 
mounted with the fstab entry;
# allow USB flash drive mounting for anyone.
/dev/sdd1               /mnt/usb      vfat 
auto,nosuid,user,exec 0 0
I hope that helps.
-Nick
           _      __   ____
    ____  (_)____/ /__/ __/
   / __ \/ / ___/ //_/ /_
  / / / / / /__/ ,< / __/
/_/ /_/_/\___/_/|_/_/
Nicholas S. Frost
nickf at nickorama.com
    
    
More information about the nmglug
mailing list