I am running Red Hat Linux 7.0 on a PII 266Mhz with 96mb ram. The system is running off a 9 gig SCSI drive, and I have a 13.7 gig IDE and a 60 gig IDE drive that I am trying to mount. There are two partitions on the 60 gig, (hda1 and hda5) and one on the 13.7 gig (hdb1). I can mount all three partitions as root, however, when I look at the file permissions (as any user, including root) and make changes to them, the changes do not take effect. When I view the permissions again, they are in their origional state. Additionally, subsequent mounts of the drives sometimes result in seemingly random permissions, (such as 0775 or 0002). Needless to say, other users on the system cannot write to the drives or even read from them sometimes. I set the permissions of the directories the drives are being mounted to, (0777) and it appears as such when the drive is unmounted. However, as soon as the drive is mounted, the permission changes to 0000 9 times out of 10. The other time it will be a strange permission like 0002 or 0775. Once the drive is unmounted, the permission on the directory appears again as 0777. After discussing this with several other Linux users, I can only conclude that this is a bug. Any help would be appreciated. Thanks John Finlay
I can't reproduce this, and the mount program definitely doesn't change permissions. If this is a Linux problem, it's a kernel problem, though I'd think it's something else. Are you using a strange filesystem? Or running an automounting daemon or kernel patch that changes permissions?
The filesystem on the system drive is native Linux, and the file systems on the other three partitions / drives are all vfat (windows FAT32) There are no autoloading daemons running. I have not made any changes to the kernel either, its straight "Out of the box".
The VFAT filesystem doesn't have any permission scheme of it's own. The solution is to add the permissions mask to the mount options in /etc/fstab. The VFAT filesystem will not retain any permissions that you attempt to set while it's mounted. Do a 'man mount' and look at the options for the fat filesystem type. There are various permissions options relating to uid, gid, and umask.