On Sun, 17 Jan 1999, Pierre Habraken wrote:
> I would like to use autofs for mounting local vfat file systems residing
> on removable media such as floppies or zip disks.
generally, supermount is more suitable for this purpose.
> Once mounted the file system should be seen as owned by the user who
> attempted to access this file system, not by the super user.
>
> Without autofs, the above result is obtained by putting the option
> 'suid' in /etc/fstab, like in the following entry:
>
> /dev/fd0 /mnt/floppy vfat user,noauto,suid 0 0
actually, it is the "user" option that allows any user to mount the file
system with their own permissions. "suid" allows SUID executables to be
executed from the mounted filesystem which is a huge security hole, as
anybody could become root by simply mounting a floppy with SUID root shell
un it...
> Expecting to obtain the same result with autofs, I put the following
> entry in /etc/auto.misc:
>
> floppy -fstype=vfat,suid :/dev/fd0
>
> However, when an ordinary user executes 'ls -l /misc/floppy' all files
> and directories on the floppy are listed as owned by root, not by this
> user.
>
> Apparently autofs executes mount with the real id. of root, where I
> would expect that it executes mount with the real id. of the end user.
>
> Am I right ? Does anybody know how to obtain the right behavior (file
> system mounted as owned by the user not by root) ?
AFAIR, there is no simple way to achieve this via autofs, as the
automountd is running as root and it has no chance to ever get to know who
accessed the mount point.
------------------------------------------------------------------------
Siegfried Langauf Student der Softwaretechnik, Uni Stuttgart
"If one is master of one thing and understands one thing well, one has
at the same time, insight into and understanding of many things."
-- Van Gogh
------------------------------------------------------------------------