Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Jun 2009 15:23:00 -0700
From:      perryh@pluto.rain.com
To:        rsmith@xs4all.nl, peter@boosten.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Installing latest version of LaTeX
Message-ID:  <4a2aec44.Ns0KUKDux1uwGV04%perryh@pluto.rain.com>
In-Reply-To: <20090606191241.GB21767@slackbox.xs4all.nl>
References:  <900923.129.qm@web39101.mail.mud.yahoo.com> <86prdhuazk.fsf@nowhere.org> <b6c05a470906061046g7a23529esaded539a48b94125@mail.gmail.com> <20090606180108.GA20291@slackbox.xs4all.nl> <4A2AAFA3.7080502@boosten.org> <20090606191241.GB21767@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Roland Smith <xs4all.nl!rsmith@agora.rdrop.com> wrote:
> On Sat, Jun 06, 2009 at 08:04:19PM +0200, Peter Boosten wrote:
> > Roland Smith wrote:
> > > On Sat, Jun 06, 2009 at 01:46:36PM -0400, Daniel Underwood wrote:
> > >> Having trouble mounting the ISO:
> > >>
> > >> [daniel@bsdbox ~]$ sudo mount_cd9660 -o ro /dev/`mdconfig
> > >> -a -t vnode -f ./texlve2008.iso` ./mount/
> > >> mdconfig: open(/dev/mdctl): Permission denied
> > > 
> > > Regular users don't have read/write permissions on /dev/mdctl.
> > > ...
> > Hmmm, one might think that 'sudo' does exactly that ;-)
>
> It does that for the mount_cd9660 command, but _before_ sudo it
> called, the code between backticks is executed by the shell as the
> regular user.  I thought that was obvious, so I didn't mention it.

Perhaps (untested):

sudo 'mount_cd9660 -o ro /dev/`mdconfig -a -t vnode -f ./texlve2008.iso` ./mount/'

The idea being that, AFAIK, backticks within single quotes won't be
interpreted by the current shell, so should be handled by the sudo
shell.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4a2aec44.Ns0KUKDux1uwGV04%perryh>