Want to work with documents made in Windows but don't know how

Tim Chase blinux.list at thechases.com
Sat Oct 28 22:13:57 UTC 2006

 > edit the files unless i'm root, and i don't have the
 > permissions to change owner of the files even if i'm root
 > and from Gnome i can't even copy the files to Linux.  Is
 > there a way to work around this even though i know that
 > VFat doesn't support permissions and so on?

Because VFat doesn't have per-file permission-tracking, you
have to specify the the permissions for the entire mounted
tree rather than on a per-file basis.  You can do this by
editing the "options" field (4th column) of your /etc/fstab
file.  I don't remember the exact settings (though I'll try
with what I have in the man pages for "man fstab" and "man
mount"), but you'll want to tinker with the following


If you want multiple users on your machine to be able to
read and write in the vfat partition, you'll want to add
them all to the same group.  For the sake of example, I'll
use "krister" and "mom" as likely users of your computer,
and assume that they're both in the group "ekstrom".  As
you're administering the box, you may want to set the UID
value to your user ID which you can find by running the "id"
command at the prompt.  You'll want to set the GID value to
the group-id of the "ekstrom" group.  That way, mum will be
able to operate on the files too.

You can then set the umask which will effect all files, or
(IIUC) you can set the dmask/fmask pair to treat directories
and files differently.  Last time I did this, I think I set
the the dmask to 007 (meaning that I, the owner, and those
in my group could read and write the files, but those that
weren't in the group-ID that I specified, couldn't touch the
directory).  I then set the fmask to 117 which allowed folks
in the group to read and write files (but not execute, as I
had no reason to be sharing executable scripts between my
vfat and linux sessions) and prevented all access by folks
not in the group.

Thus, I would do the following:


and glean my UID as well as the GID of the group I want to
associate with this.  On my system, they come back as
UID=1000 and GID=1001  I'd then edit your /etc/fstab and
skip down to the line where you mount your vfat
filesystem(s).  Go over to the 4th column (the first is the
filesystem, the second is the mount point, the third is the
file-system type of "vfat") and make sure that it includes:


I might have those octal numbers for the masks inverted a
bit, but if you experiment with them, you should be able to
get what you want.

An alternate scenario is that you want to share those files
as read-only with others in a specified group (allow mum to
read these files, but only you can edit them) in which case
you'd want to specify dmask=027 and fmask=137 so that the
user with the UID can read and write, and folks with the
right GID can read files, and everybody else can't do

The next time you mount this directory, it should pick up
these permissions.

If you want to give it a try before commiting it to your
fstab, you can unmount the directory on the command line

   umount /mnt/windows

(or wherever the mount point is in question)  and then
remount it, tinkering with the options on the command-line
with the "-o" parameter, as in

   mount -t vfat -o uid=1000,gid=1001,dmask=007,fmask=117 
/dev/hda4 /mnt/windows

If things don't come out as expected, just unmount it and
remount it with the new options until you get the desired
results.  Then just use the final options in your /etc/fstab

Give it a whirl, and drop a line here on the group if you
have further trouble with it.


More information about the Blinux-list mailing list