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

Re: Setting permissions on /mnt



On Fri, 03 Sep 2004 20:59:31 -0400
"shrevie@ntnation.com" <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).
> 
> 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).

Is the CF device always /dev/hdg1? If yes, simply adding an appropriate
entry to /etc/fstab will allow users to mount/umount it, which then
gives the user that mounted it access as well.

Additionally, there are options you can include in /etc/fstab (with the
mount command, too - man mount) that allows any user to umount it,
regardless of which mounted it, and any user to access it. To implement
these features, look at the 'user', 'users', 'uid', 'gid' and 'umask'
options for mount.

In /etc/fstab, I would probably do something like the following:
/dev/hdg1  /mnt/flash  vfat  defaults,user,gid=199,umask=007  0 0

HTH,
Jacob

-- 
GnuPG Key: 1024D/16377135

Random .signature #36:
Double your disk space - delete Windows!
http://www.linux.org

Attachment: pgpa15KuhQQYB.pgp
Description: PGP signature


Reply to: