Re: Setting permissions on /mnt
On Fri, Sep 03, 2004 at 08:59:31PM -0400, shrevie@ntnation.com wrote:
> I have a Debian Linux Sid system that has a compactflash slot, setup to
> mount CF cards on /mnt/flash.
>
> I mount them from the commandline, just doing something like this:
>
> mount -t vfat /dev/hdg1 /mnt/flash
>
> When mounted, the filesystem is read-only (which is what I want), but is
> owned by root (I can't execute mount except as root).
Yes you can, mount is setuid. But for security reasons, you will have
to add:
/dev/hdg1 /mnt/flash auto user,noauto 0 0
to /etc/fstab (as root).
Then, as a normal user:
mount /mnt/flash
Options:
change auto (3rd field) to vfat to disallow disks that aren't
DOS-formatted
change user,noauto to ro,user,noauto to prevent users from
writing
try noauto,uid=0,umask=022 for anybody-can-read
only-root-can-mount
> However, I want a non-root user to be able to access it.... and even as
> root, I can't change the perms on /mnt/flash after mounting.
You can't change the perms because vfat doesn't support perms.
If you want perms, I'd suggest using ext2fs.
> What am I doing wrong? Basically, I just want /mnt/flash to be
> accessible (read-only) by other users on the system.... but I can't
> figure out how to o this (chown and chgrp don't allow me to do it --
> probably because its read-only).
--
The world's most effective spam filter:
ln -sf /dev/full /var/mail/$USER
Reply to: