From owner-freebsd-questions@FreeBSD.ORG Sun Nov 27 15:39:17 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D20C16A41F for ; Sun, 27 Nov 2005 15:39:17 +0000 (GMT) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0E5C43D55 for ; Sun, 27 Nov 2005 15:39:13 +0000 (GMT) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with SMTP id CAA18766; Mon, 28 Nov 2005 02:38:52 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 28 Nov 2005 02:38:51 +1100 (EST) From: Ian Smith To: "matt ." In-Reply-To: <20051127120058.0F4C416A41F@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org, Glenn Dawson Subject: Re: Running mrtg on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 15:39:17 -0000 Re: freebsd-questions Digest, Vol 114, Issue 23 > Message: 6 > Date: Sun, 27 Nov 2005 05:25:26 -0500 > From: "matt ." > On 11/26/05, Glenn Dawson 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