emodha
04-01-2003, 07:17 PM
I have a hard drive set up as the secondary master and it is partioned as FAT. The root user can write to it just fine but the others cannot. The permissions allow all to write to it. Everyone can read from it just fine. There are a few folders in there which everyone is permitted to write to but only root can.
I really need to fix this problem.
Thank you
homey
04-01-2003, 07:30 PM
To allow users read – write access to a fat partition, from the command prompt type id username (id Fred) to display the user id and or group id. Use that information in the fstab file.
Three examples....
1. /dev/hdb1 /mnt/win vfat gid=500,umask=002 0 0
2. /dev/hdb1 /mnt/win vfat gid=500,umask=002,exec,dev,suid,rw 1 1
3. /dev/hdb1 /mnt/win vfat uid=500,gid=500,umask=002,exec,dev,suid,rw 1 1
Pay attention to the "umask" option in homey's examples; that's the key to applying permissions to a FAT/FAT32 volume. The umask values are the opposite of those used with chmod, so a umask of 002 is equvalent to "chmod 775".
Unlike permissions for native Linux filesystems, the permissions set by umask on a FAT volume apply to the entire volume only; you cannot apply them to individual files/directories on that volume. Also note that you cannot use chmod to change the permissions of a directory on which you mount a FAT/FAT32 volume while that volume is mounted; you need to unmount it first or the permission change will not have any effect.