Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


writing to FAT partitions

Posted on 1999-07-18
Medium Priority
Last Modified: 2008-02-26
how do you mount FAT16/FAT32 partitions so that any non-root user (or better yet, specified non-root users) can *write* on it?
Question by:Alex_Tan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

syzygy earned 80 total points
ID: 1635513
DOS does not store permissions like ext2 does.  by using lines in fstab liek the following

dev/hda1      /mnt/fat16 vfat user,exec,dev,suid,rw,umask=0000 0 0
/dev/hda5      /mnt/fat32 vfat user,exec,dev,suid,rw,umask=0000 0 0
/dev/hda6      /mnt/ntfs  ntfs user,exec,dev,suid,rw,umask=0000 0 0

the drive will be mounted with a deafault permission of 777 (the binary invers of 000) modified only if a file is read only.

the above lines from my fstab include a fat16, a fat32, and an NTFS partition.. they all work, and I can read write to all of them  (you only get access to NTFS if you enable it in the kernal, and it comes with dire warnings of not working properly but it seems to be fine for me)

As to getting it so only certain users can access the drive, you'd have to do something like:

place the lines in fstab, set so it wont mount at boot time
only allow certain users permission to use mount

then they need to mount the partition whenever they want  to use it, and other users can mount anything at all.

such is the drawback of a DOS file system.

(BTW:  if you use type MSDOS instead of VFAT, it will work but you lose long file names)

Author Comment

ID: 1635514
Good answer (and I'll give it an A cos it answered what I really wanted to know) but the thing about limiting access to mount is still a kludge. I suppose this might well be necessary with DOS partitions but to limit access to mount might cause problems with things like access to /dev/fd0, if you get what I mean. This might well be a feature in some systems but not all...

Expert Comment

ID: 1635515
you dont need to mount a floppy to use it.  you can use mcopy, mdir, mdel etc to access a floppy without mounting it (which is teh way you have to do it if you want to be secure about it)

FAT will never be secure though.  NTFS might be, but the linux implementation of teh write function is still in beta.


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question