Help sharing vfat partition between opensuse and windows

Hi all!

I am a first time linux user, just installed opensuse yesterday, and am having some trouble setting up a shared fat32 partition between windows and opensuse. I have read all I can but i’m really stumped, so sorry if this is an obvious question.

Anyway, here’s what’s happening: I have a partition set up for windows XP, then a fat32 partition I want to mount to /shared and use to share documents etc. between OSs, then the main ext3 partition, and swap. The problem is, no matter what I do, it will not allow a user other that root to write to the shared partition. Here’s what I tried so far:

I added this line to fstab which, as far as i can tell, should give all users the ability to read and write to the partition:

/dev/sda5      /shared       vfat      defaults,rw,users       0 0

This didn’t work (nautilus error says “permission denied”), So I figured the permissions on the folder must be set wrong. I “ls -l /” and got this:

drwxr-xr-x  11 root root 16384 Dec 31  1969 shared  

so i unmounted /dev/sda5 and opened a terminal as root and entered “chmod 777 /shared” which gave me this:

drwxrwxrwx   2 root root  4096 Mar  1 01:21 shared

The I mounted /dev/sda5 again, but it still didn’t let write to the partition. It also automatically changed the permissions of /shared back to drwxr-xr-x

Now I am completely stumped and have no idea where to go from here. I searched the internet as much as possible and nothing seemed to be working. Any idea how I can allow non-root users to write to this partition?

the output of “df” with all partitions mounted, incase you need it, is:

/dev/sda7    17860580   4933776  12019536  30%   /         
udev           109160      1948    107212   2%   /dev      
/dev/sda1    17406392   1679852  15726540  10%   /windows/C
/dev/sda5    22520112  15355600   7164512  69%   /shared   

Again, i’m a complete noob, so sorry if this is an obvious question. also, is there any other info I should give?

I think somebody else will chime in with a pointer to a HOWTO on the OpenSUSE Wiki, but I’ll just correct a couple of misunderstandings.

“user” (and the related option “users”) in the mount options doesn’t mean mount so that any user can have write access to it. “user” means any user can mount it manually. “users” means in addition that any user can unmount it, not just the user who mounted.

The problem is that when the system boots, it’s root that does the mounting automatically, and thereafter the permissions reflect this.

What you want to do is make it so that when root mounts, it is done with your uid. The uid=ragingtornado (or whatever your login name is) is what you want to add to the options. Then the files in partition will be “owned” by you. I write “owned” because FAT doesn’t really contain permission info. This is “faked up” by the mount option. That’s also why you couldn’t change the permissions, there are no permissions on the filesystem to change.

If you are not the only user on the machine wanting to use the FAT partition, then you need to look into the gid option, and also the umask and dmask options to allow sharing by a group.

Wow! Thanks for the fast reply!
it worked like a charm!
I really appreciate the help, it’s the great community like this that makes me think ill be sticking with linux for a while.

take luck

There’s a full background on fat32/vfat options here:
openSUSE: HowTo set disk access permissions for Fat32 (VFAT) on a desktop PC