Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2005 18:05:30 -0500
From:      "matt ." <fasterdisco@gmail.com>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        freebsd-questions@freebsd.org, Glenn Dawson <glenn@antimatter.net>
Subject:   Re: Running mrtg on FreeBSD
Message-ID:  <a97e11c20511271505g2e6999b5wedb7252fa1f3f453@mail.gmail.com>
In-Reply-To: <Pine.BSF.3.96.1051128021338.15997A-100000@gaia.nimnet.asn.au>
References:  <20051127120058.0F4C416A41F@hub.freebsd.org> <Pine.BSF.3.96.1051128021338.15997A-100000@gaia.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Ian,

I agree it smells very strongly like permissions, but everywhere I look the
permissions are ok.

/usr/local/bin/rateup is world executable.

Note that if I make a symlink to where MRTG (when run as mrtg:mrtg) expects
to find 'rateup' (which is in / ) everything will work but I'll get the
following complaints in my /var/log/mrtg.log:

2005-11-27 18:00:00 -- Started mrtg with config
'/usr/local/etc/mrtg/mrtg.cfg'
2005-11-27 18:00:00 -- Use of uninitialized value in concatenation (.) or
string at /usr/local/bin/mrtg line 720.
2005-11-27 18:00:00 -- Use of uninitialized value in concatenation (.) or
string at /usr/local/bin/mrtg line 744.

Of course, when run as root there are no complaints at all.  It *seems* to
work, but I don't like running it when it complains.  It's ugly and I'm too
much of a perfectionist.

Ugh, I don't know where else to look!   :)

Matt

On 11/27/05, Ian Smith <smithi@nimnet.asn.au> wrote:
>
> Re: freebsd-questions Digest, Vol 114, Issue 23
> > Message: 6
>
> > Date: Sun, 27 Nov 2005 05:25:26 -0500
> > From: "matt ." <fasterdisco@gmail.com>
>
> > On 11/26/05, Glenn Dawson <glenn@antimatter.net> wrote:
> > >
> > > At 05:24 PM 11/26/2005, matt . wrote
> > > I don't think it's a bug in the port.  I've installed it many times
> > > recently and not had any problems.
> > >
> > > What version of Perl are you using?  Version of FreeBSD?
> > >
> > > It looks as if the FindBin perl module is failing to find the correct
> > > location of the mrtg script, which then causes it to look for rateup
> > > in the wrong place.
>
> Yes, specifically it seems to be returning '' instead of
> '/usr/local/bin' which was to be prepended to '/rateup'
>
> [.. system and perl versions ..]
>
> > The only thing the same is the version of my MRTG port.
> >
> > I was unable to find the which module installs FindBin.  I checked
> > freshports.org and didn't find any port specifically related to anythin=
g
> > called FindBin.  Thanks.
> >
> > matt
>
> [..]
>
> > > > > Still seeing the same error.  I created /usr/local/www/mrtg owned
> by
> > > > > mrtg:mrtg.  I run the following in mrtg's crontab:
> > > > >
> > > > > */5 * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
> > > > > --debug=3Dcfg,dir --logging /var/log/mrtg.log
> > > > >
> > > > > And I see the debug check the config and dir structures ok:
> > > > >
> > > > > 2005-11-26 19:58:00 -- --dir: ensure path
> IN:  '/usr/local/www/mrtg'
> > > > > 2005-11-26 19:58:00 -- --dir: ensure path OUT:
> '/usr/local/www/mrtg/'
> > > > > 2005-11-26 19:58:00 -- --dir: imagehtml =3D
> > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenatio=
n
> (.)
> > > or
> > > > > string at /usr/local/bin/mrtg line 720.
> > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenatio=
n
> (.)
> > > or
> > > > > string at /usr/local/bin/mrtg line 720.
> > > > > 2005-11-26 19:58:00 -- ERROR: Can't Execute '/rateup'
> > > > >
> > > > > Still trying to execute /rateup.  This works flawlessly when run
> by
> > > root.
> > > > > I don't get it.
>
> Smells like permissions, if root can, and mrtg:mrtg can't ..
>
> > > > > Here is line 720 of /usr/local/bin/mrtg:
> > > > >
> > > > > ((($MRTG_lib::OS eq 'NT' or $MRTG_lib::OS eq 'OS2') and (-e
> > > > > "${FindBin::Bin}${MRTG_lib::SL}rateup.exe")) or
> > > > >      (($MRTG_lib::OS eq 'NW') and (-e "SYS:/Mrtg/bin/rateup.nlm")=
)
> or
> > > > >      (-x "${FindBin::Bin}${MRTG_lib::SL}rateup")) or
> > > > >        die "ERROR: Can't Execute
> > > > > '${FindBin::Bin}${MRTG_lib::SL}rateup'\n";
>
> Assuming FindBin::Bin and/or MRTG-lib::SL doesn't need to run as root
> (?), maybe not all of /usr, /usr/local and /usr/local/bin are world
> readable/executable (o+rx), or maybe rateup itself isn't executable by
> mrtg:mrtg?
>
> Just a hunch, cheers, Ian
>
>



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