LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   reading/writing mounted vfat as user? (https://www.linuxquestions.org/questions/linux-general-1/reading-writing-mounted-vfat-as-user-107529/)

freeindy 10-23-2003 07:25 AM

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

robartes 10-23-2003 07:28 AM

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.

freeindy 10-23-2003 07:38 AM

thanks a million. works just fine.
Will it be auto mounted when i log in as user?

indy

robartes 10-23-2003 07:59 AM

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.

fsbooks 10-23-2003 08:03 AM

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.


All times are GMT -5. The time now is 06:08 PM.