[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting permissions on /mnt



* shrevie@ntnation.com <shrevie@ntnation.com> [2004-09-03 20:03]:
> 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).
> 
> 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.
> 
> 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).
> 
> Any ideas?

Modify /etc/fstab to include the line:

/dev/hdg1   /mnt/flash   vfat     ro,umask=007,users,noauto,gid=109   0   0

(gid is the group id that includes the users you want to have access to
the CF card.)

Any user in the group (and, of course, root) can mount the drive with a
simple "mount /mnt/flash", but once mounted, only that user (and, of
course, root) can umount with "umount /mnt/flash" man fstab for more
details.

-- 



Reply to: