krysgian has asked for the wisdom of the Perl Monks concerning the following question:
I have this non strict perl script which contains this and is executed from a java servlet:
$fooDir = "D:/foo"; system("touch $fooDir/test"); system("\"$fooDir/bar.bat\"");
The file "test" appears in D:/foo, but bar.bat does not appear to be executed.
If I execute bar.bat manually, or if I execute the perl script manually, bar.bat executes.
What's more frustrating is, this used to work. I'm not quite sure how it broke. I was fixing an unrelated part of the servlet which isn't directly connected to the perl program. $fooDir is a constantly changing directory, but the root directory (I should mention this is Windows) is fully open, permissions wise, to "everyone" and "system" users.
Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't execute system() when called from servlet (security)
by tye (Sage) on May 28, 2014 at 22:37 UTC | |
|
Re: Can't execute system() when called from servlet
by Anonymous Monk on May 28, 2014 at 16:54 UTC | |
by Anonymous Monk on May 28, 2014 at 16:59 UTC | |
|
Re: Can't execute system() when called from servlet
by Laurent_R (Canon) on May 28, 2014 at 17:51 UTC | |
|
Re: Can't execute system() when called from servlet
by Anonymous Monk on May 28, 2014 at 20:57 UTC | |
by Anonymous Monk on May 28, 2014 at 22:13 UTC | |
|
Re: Can't execute system() when called from servlet
by Anonymous Monk on May 29, 2014 at 23:21 UTC |