Tom, thanks info.
I asked Google to find "Args must match #! line' - it failed -
I did not think about perldiag - hopefully I will remember
next time!
I appreciate your concerns about security and just note that
the server is located on a private network
reachable only via the LAN and the script filters the
query string to accept only a single MAC in CISCO format
else present an error message. (And only certain manufacturers' MACs!)
line1
# head plot.cgi
#! /usr/bin/perl
I do not know how Apache launches the script without going through the C
code!
Is it documented anywhere?
What I am trying to do is to prepare a plot of real time data
(history of the last 24 hours to date) upon demand (click)
and put the image created in ./html/images/
which is owned by root - read only to others.
suggestions welcomed!
I am using gnuplot to produce a .png file
There is no need to store the image as it is created each time viewed but
I have not figured out how I might create an image and spit it out without
first creating a file. Maybe I should switch to javascript and let it draw
the image in the user's browser!
John
Tom Phoenix wrote:
On 8/24/06, John Ackley <[EMAIL PROTECTED]> wrote:
Subject: sssh bang problem
Cool. It's been a long time since we've gotten a problem with sound
effects.
# perl -c plot.cgi
Args must match #! line at plot.cgi line 1.
This message is covered in perldiag:
(F) The setuid emulator requires that the arguments Perl was
invoked with match the arguments specified on the #! line.
Since some systems impose a one-argument limit on the #! line,
try combining switches; for example, turn -w -U into -wU.
When you run a set-id program, you can't give perl arbitrary command
line flags, because many of those flags would change the meaning of
the program against the wishes of the program's owner.
where did I go astray?
What are you trying to do with -c? That's used to check (but not run)
the program; but you're talking about running the program for real,
right? If you just want to check it with -c, you'll need to take off
the set-id bit (or simply check it as the owner).
script is owned by root with suid set
-rwsr-sr-x 1 root wheel 5415 Aug 24 11:42 plot.cgi
Ooh, that can be dangerous. Will nothing less than root suffice? I
hope you know what you're doing.
Cheers!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>