How to allow a user access to a USB drive
Hi All,
When I plug my Lexar Jumpdrive in my USB port ( as root ) I run a mount command: Code:
mount -t vfat /dev/sda1 /mnt/usb I tried chmod 766 /mnt/usb (as root) and even added the -R option and still wont change permission so any other user other then root cannot access the drive. I added the following in fstab but still no change. Code:
/dev/sda1 /mnt/usb vfat noauto,rw,user 0 0 Gnarg :study: |
Dunno about Mandrake, under Gentoo your user has to be member of usb group.
|
Thanks for the reply Emerson,
I do have that user in the usb group and still keep getting permission denied. I did notice something though, in ~/mnt/usb ( users account ) has the group and owner for regular users. Only root can mount the USB drive so when I mount using root to my users home folder/mnt/usb the ownership changes to root:root. Gnarg |
I have an USB multifunction flashcard reader. Never used it with my Gentoo box. Now I plugged it in first time. First I saw a message on console announcing /media/usbdisk directory is created. Then I opened my fstab and saw a new line
Code:
/dev/sdd1 /media/usbdisk vfat user,exec,noauto,utf8,noatime,sync,managed 0 0 |
Well I thought I'd copy your parameters for fstab and still no luck. I can only mount as root and I still keep getting permission denied messages when trying to access the usb drive. :(
Gnarg |
Re: How to allow a user access to a USB drive
Quote:
(because it is a vfat drive). Regarding, the fact that you can't mount it. The line from /etc/fstab seems ok to me unless i am forgeting something. The first thing that comes to my mind is that you don't have read permissions on /dev/sda1 as user. do a "ls -al /dev/sda1" and see what are the permissions. |
You can also try adding "umask=0222" after "auto,user" etc. That works for NTFS partitions - when Root can read and a User can't, that was the solution I found.
|
Hi imitheos,
I ran the command and here is the output lr-xr-xr-x 1 root root 34 Sep 25 14:00 /dev/sda1 -> scsi/host4/bus0/target0/lun0/part1 morrolan, I also did as you suggested and it did not work. There's a change I entered it wrong so here's a snippet: Code:
/dev/sda1 /mnt/usb vfat user,exec,noauto,utf8,noatime,sync,managed,umask=0222 0 0 On another note since I'm editing /etc/fstab should I reboot after every change? That's what I've been doing so far. Gnarg :study: |
Quote:
so you should also do a "ls -al /dev/scsi/host4/etc/etc" Quote:
|
Hmmmm very odd.
The problem I have does not happen at home. My home Gentoo box I added the information into fstab and worked for me. My normal user can access the drive with no problems. Now its just my work computer I have the problem on. I must have done something wrong. This I can work with and I will be able to find my problem at work. Thanks for your help, I would never have figured out how to do this. :) Gnarg :D |
All times are GMT -5. The time now is 12:20 PM. |