LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   when I mount my usb hard drive, I have to be root to access it? (https://www.linuxquestions.org/questions/linux-hardware-18/when-i-mount-my-usb-hard-drive-i-have-to-be-root-to-access-it-151169/)

nakedpretzel 02-27-2004 10:24 AM

when I mount my usb hard drive, I have to be root to access it?
 
I have gone through everything I can think of. I have edited fstab to add a uid to my user. I have tried 'chmod /mnt/usb' and 'chmod 755 /mnt/usb'

But nothing seems to work. I can't access it via 'sudo' either. I MUST be 'su'ed in as root.

Anyone have any idea?

fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda2 / ext3 errors=remount-ro 0 1
/dev/hda3 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/cdrom /cdrom iso9660 unhide,ro,user,noauto 0 0
/dev/hda4 /storage ext3 defaults 0 0
/dev/sda1 /mnt/usb vfat unhide,user,noauto 0 0

mtab when mounted:

/dev/hda2 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw 0 0
/dev/hda4 /storage ext3 rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw 0 0
sysfs /sys sysfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/sda1 /mnt/usb vfat rw 0 0


Anyone have any info?

Thanks

Luke

Nis 02-27-2004 10:36 AM

Change
Code:

/dev/sda1 /mnt/usb vfat unhide,user,noauto 0 0
to
Code:

/dev/sda1 /mnt/usb vfat unhide,user,noauto,umask=000 0 0

Electro 02-27-2004 09:47 PM

If you haven't spotted the dfferenece in Nis post. Nis added umask=000. This setting make sure that when you write a file or directory to the medium it will have a permission of 777. I suggest not putting an entry in the fstab for USB devices because every time you connect and disconnent a USB device it changes where the device is assign to. Its best to use hotplug to mount the device by detecting the device ID and manufacture then mount to the directory that you desire.


All times are GMT -5. The time now is 04:12 AM.