[mrtg] Re: Help/Ext. Script : Could not get any data from ext erna l command

McDonald, Dan Dan.McDonald at austinenergy.com
Wed Jul 30 12:19:19 MEST 2003


>> >When i want to use mrtg.cfg with a external script i get the following
>> >errormessage on run of mrtg:
>> >
>> >---
>> >WARNING: Running '/etc/mrtg/ping.sh': Permission denied
>> 
>>Looks like the mrtg user doesn't have execute permission on that script.


>Yes, but this is strange as mrtg is running in the root account.
>crontab:
>0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg.cfg
>
>It should have all the rights to execute any scripts.

First off, running things like mrtg as root are generally bad ideas - you
should create a non-privileged user to run it.
But even root can't run a script if the execute bit isn't set on the
permissions.  try:
chmod u+x /etc/mrtg/ping.sh

>Any clue why its not working?

I've also run into that type of error when copying scripts from windows
machines, because the first line isn't just #!/bin/sh, it's actually
#!/bin/sh\n, which is a valid filename on unix, but not at all what you
want.  If you pull up the file in vi you can see if the format is [dos].  If
so, do 
:set fileformat=unix
:wq




-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list