Help - Search - Members - Calendar
Full Version: Mounting A Vfat Windows Partition
Linuxhelp > Support > Technical Support
bcal
I have a vfat partition i use to share files between Linux (Fedora Core 2) and Windows XP. It is defined in /etc/fstab and mounts fine to /mnt/transfer, with all the directories and files it contains owned by user "root" and group "root". All users can read all the files, but obviously only root can currently write to the partition. I'd like normal (non-root) users on linux to be able to write to the partition, but I cannot change the ownership of any of the directories (or even individual files) on the partition using either the CHOWN or CHGRP commands - I get an "operation not permitted" message. I am executing the commands as root and the partition is not mounted as read only. The parameters in /etc/fstab are:
/dev/hda2 /mnt/transfer vfat defaults 0 0

Am I being stupid? All help appreciated.
hughesjr
All files mounted in a FAT32 (vfat) directory will be owned by one person ... that is because FAT32 doesn't allow for individial file ownership.

So when linux mounts the partition, you must tell it who the user and group will be. If you don't specify, root will be the owner and group.

You can specify the umask, user and group with the following options in the in /etc/fstab:

/dev/hda8 /windows/F vfat umask=0000,uid=linux_user,gid=linux_group 0 0

In the above example, the linux user named linux_user and the members of linux group linux_group would be able to read and write while logged in to linux to the partition.

If you cahnged the umask to 0002, then members of the group could write ... but the user could not.
bcal
Excellent, thanks very much. Sorry about the delay in replying, only just got around to doing the fix due to various reasons. Now if I can just get my new ATI graphics card working...<sigh>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.