LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-13-2006, 05:53 AM   #1
brooky9999
Member
 
Registered: May 2006
Location: Marlow, UK
Distribution: Slackware 12.2
Posts: 232

Rep: Reputation: 30
Permissions error on vfat USB drive


Hi guys,

I have a weird permissions problem on a USB drive.

As my non-root user account, I mount the USB drive using either:

Code:
su
mount -t vfat /dev/sda1 /mnt/usb
or

Code:
sudo mount -t vfat /dev/sda1 /mnt/usb
I can then read from the device, but if I try to write to it I'm told I don't have permission.

Before mounting the drive, the /mnt/usb folder is owned by the non-root account and has full permissions.

After I mount the drive, the ownership and permissions change to that of root.

I know I can modify my fstab file so that /dev/sda1, /dev/sdb1 etc. can be mounted by users - but this doesn't work for me. I often mount my USB iPod (which also shows up as /dev/sda1 or sdb1) into the /mnt/ipod folder... so the fstab route isn't ideal.

Does anyone have an idea as to why permissions are being assigned to a vfat USB drive?

System is Slack 10.2 with 2.6.17.7 kernel.


Mark.

Last edited by brooky9999; 08-13-2006 at 05:57 AM.
 
Old 08-13-2006, 06:12 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I may have misunderstood but
(1) change permission of /mnt/usb to root

(2) instead its the /etc/fstab entry that gives the rw or ro attribute to the user or users.

eg in Mandriva mine is

/dev/uba /mnt/flash xfs noauto,users 0 0

....due to a HAL daemon detecting the device as uba.
then I formatted as xfs to save me if I forget to umount it.
and rw is assumed if ro is not specified.

works for me so in theory yours could be

/dev/sda1 /mnt/usb vfat noauto,users 0 0

hope that helps?
 
Old 08-13-2006, 06:16 AM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
oh an idea on your device name

when you boot up always connect the ipod and usb and have entries in fstab as

noauto

then one will always be sda and the other sdb......


ps you will notice that I do not mount a partition of my usb but the whole device in my file sys table
 
Old 08-13-2006, 06:53 AM   #4
nuxrl
Member
 
Registered: Jun 2006
Location: NY, USA
Distribution: Slackware, Arch
Posts: 176

Rep: Reputation: 35
Code:
su
mount -t vfat -o noauto,rw,uid=n,gid=n /dev/sda1 /mnt/usb
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
file permissions on usb drive nodisk Linux - Newbie 4 12-26-2005 10:42 PM
Permissions on a mounted vfat USB external harddrive Hikaru79 Linux - Hardware 2 02-25-2005 05:39 PM
usb drive on Deb Sarge/2.6.10 mounting as msdos not vfat HalfDiminished Debian 9 02-22-2005 06:53 AM
Mounted drive permissions? Vfat kiteless Linux - General 3 08-29-2003 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration