mounting FAT32 partitions ready for read-write

Posted: September 22, 2006 in linux

don’t you just get annoyed when you couldn’t write anyhing to your FAT32 partition everytime it’s mounted? unless if you were root, in most cases you wouldn’t want to do that while doing petty things such as copying your MP3s or videos to it.

now why FAT32? aren’t most Windoze filesystems nowadays using the newer NTFS filesystem(FS)? well you couldn’t really write to NTFS. Linux only has read-support for it. so for dual-booters like me i prefer to keep a rather large portion of my 2nd hard drive into a format that’s friendly to both Operating Systems(OS). this way i can have my files accessible on either OS.

so here’s what you do. in your /etc/fstab file, you create the usual entries and then just add the umask permissions for it. you would do this under the 4th column. this is where the mount options for the FS are placed.

on this one, the value i give for umask is read/write permissions for everyone.

here’s what my /etc/fstab entry looks like then:

/dev/hdd5 /media/shares/fat32 vfat defaults,umask=0000 0 0

without umask, when you mount a FAT32 partition as root, it will be owned by root and readable/writeable to the former only. regular users may only be able to read from the FS.

umask, by the way, is just a way to set permissions to files. if you’re familiar with regular file permissions such as 755 (-rwxr-xr-x) or 644 (-rw-r–r–), then umask works somewhat like the opposite.

for example if you wanted to make some file named foobar.txt only readable/writable to you while just readable for the rest, then you’d so something like this:

chmod 644 foobar.txt

an equivalent value for umask would be 022 for the example above.

this is how it works. for files you’d subtract 666 to get the desired value you’d want for umask, and 777 for directories.

so before i go too far on this post, i’d say you should be off reading the manual for umask. my main concern here is to have Linux mount your FAT32 partition from boot so that your regular user could write to it.

Advertisements
Comments
  1. Anonymous says:

    Very nice! I found a place where you can
    make some nice extra cash secret shopping. Just go to the site below
    to see what’s available in your area.
    I made over $900 last month having fun!
    make extra money

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s