PDA

View Full Version : mounting FAT with write permission for users


Garyu
August 24th, 2005, 06:35 AM
*sigh*

I cannot get my FAT32 mount in r/w mode for other users than root. It is quite annoying to have to sudo every time I want to write a file to the common drive I have created for windows/linux sharing of files.

In fstab it originally said "defaults" only for the vfat options. I have tried with "uid=1000,gid=1000" and "umask=000" and "fmask=777,dmask=777" and probably a bunch of other things I stumbled across when googling for a solution, but what works for everyone else just doesn't seem to work for me... ](*,)

And yes, I have run "mount -a" after each change in fstab, and I actually noticed a difference, because my "FTP" drive now shows under "Computer" instead of just being mounted as "/FTP". But that doesn't help me much.

I WANT TO WRITE WITHOUT BEING ROOT!!!!
please help?



From fdisk -l:
/dev/hda1 * 1 956 7679038+ b W95 FAT32
/dev/hda2 11747 24321 101008687+ 5 Utökad
/dev/hda3 957 7035 48829567+ 83 Linux
/dev/hda4 7036 11746 37841107+ 83 Linux
/dev/hda5 12164 24321 97659135 b W95 FAT32
/dev/hda6 11951 12162 1702827 82 Linux växling / Solaris/dev/hda7 11747 11950 1638567 82 Linux växling / Solaris


From fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 /FTP vfat rw,auto,user,exec,umask=000 0 2
/dev/hda6 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

Chris Cromer
August 24th, 2005, 06:43 AM
/dev/hda5 /FTP vfat rw,auto,umask=000 0 0

should do it. And I know for a fact it works because I use it myself. Although my drive is FAT32 if it matters.

Please make sure that /FTP exists before you put this into fstab and try to mount it. Otherwise it won't work.

Oh and I had to reboot before it would actually work for me. No matter how many times I tried using the mount command it didn't show the changes till I rebooted.

I hope this helps you out.

felipe
August 24th, 2005, 06:44 AM
i thought "mount" -a was useless if you don't use "umount" first :)

try this to test your settings without having to edit fstab each time:

[CODE]
mount -o remount,users,rw,<any comma separated options> /dev/hda5
[CODE]

i can write to my vfat partition, and yes, umask=000 is the correct value to achieve that

have fun

Chris Cromer
August 24th, 2005, 06:48 AM
Yeah I had tried umount, but I kept getting messages saying the partition was busy and wouldn't let me umount it.

felipe
August 24th, 2005, 07:59 AM
"the partition is busy" means you are occupying it with a shell or with nautilus etc...

close all of your windows, or ever reboot, and then try again

jamesrw
August 24th, 2005, 10:54 AM
i have my mount set to noauto because it mounts as root otherwise. works fine for me. that may depend if the mount point is under your home directory or not.

Corbelius
August 24th, 2005, 11:29 AM
/dev/hda5 /FTP vfat rw,auto,user,exec,umask=000 0 2


Change /ftp with /mnt/ftp and try again.

d0nk
August 25th, 2005, 11:29 AM
My setup allows for users to read/write. I have the drive owned by a group i made called "shared", and anyone in "shared" is able to write to it. It is mounted by root, but owned by root:shared.

here's the line from my fstab:
/dev/hda4 /shared vfat user,quiet,rw,noatime,gid=1001,umask=002 0 0