LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-23-2003, 07:25 AM   #1
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Rep: Reputation: 32
Question reading/writing mounted vfat as user?


hi all,

I have slackware 9.1 installed on my machine. I have some files i want to get hold on to in 2 of my vfat formated hard drives. i can read is as root but NOT as user. I tried a lot of stuff like chmod but i doesn't help. i changed some attributes in fstab but it didn't work either. To be honest, i don't understand how fstab/mtab works. All i want is that it is possible for me as user to read these partitions. Any suggestions? thanks

it's hda1 & hdb6 i want to get access to...

here is my fstab:
/dev/hdb5 swap swap defaults 0 0
/dev/hdb1 / reiserfs defaults 1 1
/dev/hda1 /mnt/c vfat noauto,owner,rw 0 0
/dev/hdb6 /mnt/d vfat noauto,owner,rw 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0


and my mtab:
/dev/hdb1 / reiserfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
proc /proc proc rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hdc /mnt/cdrom iso9660 ro,nosuid,nodev 0 0

indy
 
Old 10-23-2003, 07:28 AM   #2
robartes
Member
 
Registered: Oct 2003
Location: Mechelen, BE
Distribution: Mandrake as base, most software hand rolled
Posts: 80

Rep: Reputation: 15
Change these lines in /etc/fstab:

/dev/hda1 /mnt/c vfat noauto,owner,rw 0 0
/dev/hdb6 /mnt/d vfat noauto,owner,rw 0 0

to:

/dev/hda1 /mnt/c vfat noauto,user,rw 0 0
/dev/hdb6 /mnt/d vfat noauto,user,rw 0 0

(so, change the owner to user), and umount / mount them again as the user you want to have access to them. You should have full access to the filesystems than.
 
Old 10-23-2003, 07:38 AM   #3
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
thanks a million. works just fine.
Will it be auto mounted when i log in as user?

indy
 
Old 10-23-2003, 07:59 AM   #4
robartes
Member
 
Registered: Oct 2003
Location: Mechelen, BE
Distribution: Mandrake as base, most software hand rolled
Posts: 80

Rep: Reputation: 15
Quote:
Originally posted by freeindy
thanks a million. works just fine.
Will it be auto mounted when i log in as user?

indy
No, unless you put the mount commands in your .profile or .bashrc (or whichever file is appropriate for your shell), or in your X session script if you login graphically. But be sure to add some logic to detect whether or not the fs is already mounted, or you'll have a whole bunch of useless mount commands

Another option is to set up an automounter on these file systems, so they get mounted the moment you try to access them.
 
Old 10-23-2003, 08:03 AM   #5
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
if you add umask=0000 to the options, and get rid of the noauto, it will mount at boot and be usable by a standard user.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounted vfat permissions n3tw0rk Linux - General 3 12-05-2003 04:41 PM
VFAT partition can not be mounted. WHY???? robertoneto123 Linux - General 4 10-16-2003 07:19 AM
Mounted drive permissions? Vfat kiteless Linux - General 3 08-29-2003 12:32 PM
Writing to vfat. figadiablo Linux - General 3 01-29-2003 03:49 AM
VFAT mounted or Samba sx10 Linux - General 5 01-29-2002 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:22 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