setting permissions for a mounted fat32 partition

I have a dual boot system (SUSE 10 / WIN XP).  My hard disk has a shared fat32 partition.  My problem is, the fat partition is mounted in SUSE under /windows/d but I can't seem to write to it unless I am operating as root.  

I first tried changing my fstab file to include this line:
/dev/hda5           /windows/d              vfat           users,owner,rw,umask=000 0 0

That didn't work.  

Then I got very confused when I found there was also a file called mtab which had an entry for windows/d, so I changed that line to be exactly the same as the one in fstab.  Why is there an fstab and an mtab?  What's the difference?  Which one is used? Which takes precedence?

Then I opened a terminal, changed to su and used chmod thus:
chmod /windows/d 777 -Rv
The command executed without error and said it changed the permissions, however I still could not write to the fat partition unless logged in as root.  

I checked the permissions on windows/d in Konqueror, and they had not been changed - only root had full access.  So I opened Konqueror as root and changed to permissions  to give full access to everyone, applied to all subdirectories and files.  Konqueror accepted this command, appeared to apply the permissions, but as soon as I closed the 'properties' window and opened it again the changes were lost - once again only root has full access.

All I want is to have write access to my fat32 permission when not logged in as root.  Any ideas?  Or should I just give up on linux and go back to windows?

 
LVL 23
basicinstinctAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cyclops3590Commented:
You need to change the attributes in the fstab file. Change the line to
/dev/hda5    /windows/d   vfat     umask=000,users,owner,rw,uid=<the user id you want to be able to write as>,gid=<the group id you want to write with> 0 0

FAT32 doesn't have permission capability so you trick it with providing a uid and gid at mount
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
basicinstinctAuthor Commented:
Hi Cyclops
thanks for your suggestion.  My fstab and mtab now contain the line:
/dev/hda5 /windows/d  vfat  umask=000,users,owner,rw,uid=1000,gid=100 0 0

I'm afraid that hasn't seemed to fix it, I still can't write to the fat partition.

I got the uid and gid by typing 'id' in the terminal.  The output was:
uid=1000(rick) gid=100(users) groups=16(dialout),33(video),100(users)

I don't have to reboot do I?  I tried closing my session and then logging back in.  I also changed to su and entered 'umount -a' followed by 'mount -a'.

I'm not sure if it makes any difference, but I am not accessing the linux machine directly, I am connecting over a LAN from a winXP laptop using VNC Viewer.  I doubt this makes any difference but thought I should mention.

Any further ideas appreciated.
0
LuxanaCommented:
Hi, are you sure that it is fat32 partition? Can you run
# fdisk -l  and post output here?

tun :
# mount

to see how are partition mounted.

if your partition is mounted os ro then simply run:

#mount -o remount,rw  /windows/d

this will remount partition to rw.

> chmod /windows/d 777 -Rv <== this are only permition to folders.

good luck

lubo
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

basicinstinctAuthor Commented:
hi lubo - thanks for the comments
here is the output from 'fdisk -l' and 'mount'

#fdisk -l
Disk /dev/hda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *          72        1019     7614778+   7  HPFS/NTFS
/dev/hda2            1020        9580    68766232+   f  W95 Ext'd (LBA)
/dev/hda3               1          71      570276   83  Linux
/dev/hda4            9581        9733     1228972+  82  Linux swap / Solaris
/dev/hda5            1020        3569    20482843+   b  W95 FAT32
/dev/hda6            3570        4595     8241313+  83  Linux
/dev/hda7            4596        6125    12289693+  83  Linux
/dev/hda8            6126        9580    27752256   83  Linux

Partition table entries are not in disk order

Disk /dev/hdc: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1        2434    19551073+  42  SFS

Disk /dev/hdd: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               2         638     5116702+   f  W95 Ext'd (LBA)
/dev/hdd2             639        2434    14426338+   c  W95 FAT32 (LBA)
/dev/hdd5               2         638     5116671    b  W95 FAT32

#mount
/dev/hda6 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda3 on /boot type ext3 (rw,acl,user_xattr)
/dev/hda7 on /home type ext3 (rw,acl,user_xattr)
/dev/hda8 on /usr type ext3 (rw,acl,user_xattr)
/dev/hda1 on /windows/c type ntfs (rw)
/dev/hda5 on /windows/d type vfat (umask=000,users,owner,rw,uid=1000,gid=100)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,noatime,fs=floppyfss,procuid)
/dev/hdc1 on /mnt/storeii type ntfs (rw)
/dev/hdd2 on /mnt/oldc type vfat (rw)
/dev/hdb on /media/dvdrecorder type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8)


0
LuxanaCommented:
Correct me if I'm wrong by this /dev/hda5 on /windows/d type vfat (umask=000,users,owner,rw,uid=1000,gid=100) is needed to setup partiton with NTFS filesystem.

You have already mounted FAT32 on /dev/hdd2  /mnt/oldc type vfat (rw). Check you /etc/fstab and adjust the line for /dev/hda5 according /dev/hdd2 and you should be fine.

0
LuxanaCommented:
did you try this: #mount -o remount,rw  /windows/d

try it and then run #mount and paste it here
0
ravenplCommented:
> I don't have to reboot do I?
It seemed to be missed.
Yes. Either You have to remount the partition or restart the machine.
try:
umount /windows/d
mount /windows/d
0
basicinstinctAuthor Commented:
Well surprise surprise - I rebooted my computer and it works now.  It's hard for me to know what fixed it in particuler, and I'm grateful to all you experts who took the time to help.  

I think the suggestion from Cyclops to set the gid and uid was a necessary part of the fix, and raven told me that I actually did have to reboot the machine (by the way, umount /windows/d followed by mount /windows/d did not work).  So I think I will split the points between those two.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.