Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Executing unix command from scriptby philipbailey (Curate) |
on Jul 08, 2008 at 20:47 UTC ( [id://696334]=note: print w/replies, xml ) | Need Help?? |
Another way, not mentioned so far, is to set the "setuid" bit on the executable file. This assumes the file is owned by root. Something like:
As for any method giving ordinary users elevated privileges, there are security issues. You may need to check that Perl has been compiled with the "ENABLE_SUIDPERL" option. There may be other complications--but this is something else for you to consider.
In Section
Seekers of Perl Wisdom
|
|