Jump to content

Accessing a FAT partition


phunni
 Share

Recommended Posts

For the first time ever I have a dual boot machine. This has been achieved using two hard drives - one with just Linux on it and the other with windows on an NTFS partition and a FAT32 partition.

 

In Linux I can mount the FAT partition and have it as type vfat in my /etc/fstab - trouble is I have no ability to write to it! If I try to chmod or chown it at all then I get a permission denied error.

 

The drive was formatted in windows - is this likely to be the cause of my problems?

Link to comment
Share on other sites

The permissions a partition has is set when it is mounted, you can't use chmod. You need to make a minor change in your fstab.

 

/dev/hdb1 /mnt/win_d vfat iocharset=iso8859-15,umask=007,gid=500,codepage=850 0 0

 

The above line is from my fstab file. The umask and gid bits say to give user group 500 (gid) read write access. I wanted to give a group rather than an individual user access hence gid but you could also have used "uid" for a user. You can find out the gid or uid numbers from UserDrake.

Link to comment
Share on other sites

This is what I have in my /etc/fstab file

 

dev/hda6 /data vfat codepage=850,umask=0,iocharset=iso8859-1 0 0

 

Note there is no gid or uid, but the umask is set to 0. I think umask=0 will make the partition readable and writable to everyone.

 

Of course I could be wrong.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...