Peter Toft wrote:
> Hi there
>
> I can see from
> http://www.linux.org/apps/AppId_2476.html that you are
> the maintainers of the fine autofs package for Linux. I
> really like it and I have one question regarding
> mounting devices as an ordinary user. I would like to
> mount a device as the user foo so that foo owns the
> device (it is for a USB memory-stick device)
>
> If I add this line to my /etc/fstab
> /dev/sda1 /mnt/usb auto noauto,owner,user,rw 0 0
>
> then user foo can run "mount /mnt/usb" and likewise
> "umount /mnt/usb" and here foo has full ownership
> and read+write access over "/mnt/usb".
>
> Then I turn to autofs and like to have the same
> permissions for the user foo
>
There are horrible security hazards with this, because anyone can come
in and access the autofs directory. The right thing to do is to use the
"owner" flag instead, and set up your login system so that the console
user owns the removable devices, such as /dev/sda* in your case.
-hpa