Date: Mon, 28 Nov 2005 02:38:51 +1100 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: "matt ." <fasterdisco@gmail.com> Cc: freebsd-questions@freebsd.org, Glenn Dawson <glenn@antimatter.net> Subject: Re: Running mrtg on FreeBSD Message-ID: <Pine.BSF.3.96.1051128021338.15997A-100000@gaia.nimnet.asn.au> In-Reply-To: <20051127120058.0F4C416A41F@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 anything > 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=cfg,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 = > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenation (.) > > or > > > > string at /usr/local/bin/mrtg line 720. > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenation (.) > > 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?Pine.BSF.3.96.1051128021338.15997A-100000>