[Nottingham] chmod of a /mnt/dir...

Robert Davies nottingham at mailman.lug.org.uk
Wed Jul 9 13:04:00 2003


On Wednesday 09 Jul 2003 12:50, Martin wrote:
> Calling all the great gurus out there...
> How should I change the /mnt/* permissions?
>
> I've got a few windows FAT32 partitions mounted (VFAT) and they show up
> in /mnt all well and good. Root has full rwx access whilst all others
> have r access only and hence cannot navigate further down the directory
> tree.

As FAT32 (VFAT) was not designed with multi-user use in mind, the permissions 
are not stored in the file system, probably those chmod's are implemented as 
NULL ops in the filesystem code.

The ownership and permissions are actually decided when mounting, this has the 
advantage that user mounts can be permitted, and the files look like they 
belong to the person with the floppy disk or CD-ROM.

See man page for fstab, and mount looking for the options, it'll take a while, 
but don't panic seeing the vast number of possibilities you can ignore the 
ones you are not interested in.

An example from my /etc/fstab file is :

/dev/fd0        /media/floppy   auto            noauto,user,sync 0 0
/dev/cdrom           /media/cdrom         auto       ro,noauto,user,exec   0 0

If you need more, then the mount options for fat include uid=value, gid=value 
and umask=value, there's some extra options for vfat but most likely you 
won't need those.

Rob