Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
No warning or errors occur so I now can access my usb drive. However when the drive is mounted and I use my normal user's account I do not have permission to access /mnt/usb. I can go to /mnt just not the sub folders.
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
Any clues as to what I'm doing wrong. All I need to my regular user to have access to my usb drive and I rather not use root to have only access to it.
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.
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
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.
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
No warning or errors occur so I now can access my usb drive. However when the drive is mounted and I use my normal user's account I do not have permission to access /mnt/usb. I can go to /mnt just not the sub folders.
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
Any clues as to what I'm doing wrong. All I need to my regular user to have access to my usb drive and I rather not use root to have only access to it.
Gnarg
Firstly, when you mount the flash as root you don't have access permission as a user because mount changes the permissions
(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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.