LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't get fstab right to let user r/w fat32 parts (https://www.linuxquestions.org/questions/linux-newbie-8/cant-get-fstab-right-to-let-user-r-w-fat32-parts-186094/)

BuckeyeFan 05-26-2004 11:28 AM

Can't get fstab right to let user r/w fat32 parts
 
I know there are a lot of posts on this so I have spent a few days searching them and trying the suggestions but nothing has worked so I need a unique answer I think.

My problem is that I can't seem to get access to fat32 partitions used by XP under user account, only root. I can unmount under root, and mount as user and read/write to them just fine, but would like to boot with access for user because I keep certain things I use in both OS's like wallpapers and icons on one of the fat32's to save space but then they wont load when I boot. Also, if I edit fstab to read noauto, or add user or make other edits, new entries for the fat32 partitions magically appear in the fstab after rebooting. You can see it below.

Distro: CollegeLinux 2.5, which is based on Slack

Here is output of cat fstab:

none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /dev/pts devpts defaults 0 0
/dev/hda6 / ext3 defaults 1 1
/dev/hda8 swap swap defaults 0 0
/dev/hda7 /usr ext3 defaults 1 2
/dev/hdc
/mnt/cdrom iso9660 noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0

/dev/hda1 /mnt/c vfat noauto,user 0 0

/dev/hda2 /mnt/d vfat noauto,user 0 0

/dev/hda5 /mnt/hda5 auto defaults 0 0

/dev/hda6 /mnt/hda6 auto defaults 0 0

/dev/hda7 /mnt/hda7 auto defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0
/dev/hda1 /mnt/hda1 auto defaults 0 0

/dev/hda2 /mnt/hda2 auto defaults 0 0


Those last two entries just show up every time I reboot regardless of what changes I make, so I don't know what I'm missing. I used SuSE 9.0 previously where it mounts everything nicely for me so I don't know exactly how to do this. Please help.

320mb 05-26-2004 11:58 AM

only $ROOT can write to a vfat partition, users
have read permissions and that is about it........
safer that way

BuckeyeFan 05-26-2004 12:15 PM

Well, like I said I can read/write as user if I unmount as root first, and in SuSE 9.0, I didn't even have to do that, it was automatically configured to allow read/write for all users to the windows partitions which I what I want. And I know its safer to only login as root when necessary, but if I can't get this to work I'd rather login as root every time or go back to windows altogether (ok just kidding about the last part).

TACD 05-27-2004 09:41 AM

I have the same problem... what do I need to add to my fstab to let me write to my FAT32 partitions as a normal user? Here's how it looks at the moment...

Code:

/dev/hda5            /                    reiserfs  acl,user_xattr        1 1
/dev/hda2            /boot                ext2      acl,user_xattr        1 2
/dev/hda7            /home                reiserfs  acl,user_xattr        1 2
/dev/hdb1            /mnt/games          vfat      user,iocharset=iso8859-1 0$
/dev/hdb5            /mnt/media          vfat      user,iocharset=iso8859-1 0$
/dev/hda1            /mnt/windows        vfat      iocharset=iso8859-1  0 0
/dev/hda6            swap                swap      pri=42                0 0
devpts              /dev/pts            devpts    mode=0620,gid=5      0 0
proc                /proc                proc      defaults              0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
sysfs                /sys                sysfs      noauto                0 0
/dev/cdrecorder      /media/cdrecorder    subfs      fs=cdfss,ro,procuid,nosuid$
/dev/fd0            /media/floppy        subfs      fs=floppyfss,procuid,nodev$

I don't want to be able to write to the Windows partition as a user, but I would like to be able to write to the other two (for example, so I can burn CDs in Linux and store the files in my media partition without having to su just to copy them over!)

BuckeyeFan 05-27-2004 09:07 PM

Ok, I got it figured out finally. The Mandrake club forum is to thank for the original post I guess. When I finally got it to work after three days of trying I got up and did a little dance. Anyway... You'll probably want to back up your fstab first, then...

To /etc/fstab, I added the following entry:

/dev/hda2 /mnt/hda2 vfat umask=0,quiet 0 0

And deleted the previous entry for dev/hda2 which was something like /dev/hda2 /mnt/hda2 auto defaults 0 0
Note: in your case, you would replace

/dev/hda1 /mnt/media vfat iocharset=iso8859-1 0 0

with

/dev/hda1 /mnt/media vfat umask=0,quiet 0 0

where you could insert tabs if you want like in your fstab, but notice spacing is very important from the umask part on... don't put a space after that comma or I don't think it will work. In any event, works great for me. Hope it does for you.

Patrick


All times are GMT -5. The time now is 08:09 AM.