Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jul 2004 14:55:53 -0700 (PDT)
From:      =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mbsd@pacbell.net>
To:        jobse@yapost.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: allowing users to mount cdrom
Message-ID:  <20040703145317.A12064@sotec.home>
In-Reply-To: <1088888955.680.15.camel@localhost.localdomain>
References:  <1088888955.680.15.camel@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Jul 2004, jobse wrote:

> Dear List,
> When trying to mount the cdrom I get Operation not permitted.
> sysctl: vfs.usermount=0(what does that mean and how can I *permanently*
> change it to 1)
> I'd rather not set the sticky bit on mount/umount if I mustn't.
>
> suggestions?
> /jobse

vfs.usermount allows non-root users to perform a mount, provided that
they have sufficient access to both device being mounted and the
mountpoint.  Users won't be permitted to do other privileged
operations, such as loading kernel modules, so in some cases the mount
may still fail.

To set vfs.usermount=1 on every boot, add it to /etc/sysctl.conf (see
sysctl.conf(8)).

One way to give access to assorted files and devices to the user
currently logged in on the local console is to use /etc/fbtab (see
fbtab(5)), thus:

   /dev/ttyv0      0600    /dev/acd0
   /dev/ttyv0      0755    /cdrom

When using some GUI based login doohickey (xdm, gdm, kdm, whatever),
there are usually some kind of "pre-session" script where suitable
code can be inserted to tweak permissions on things when someone
is logging in on the local console (unless they are already reading
/etc/fbtab... I dunno, I'm not using a GUI login thingy).

   $.02,
   /Mikko



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040703145317.A12064>