hotyopa has asked for the wisdom of the Perl Monks concerning the following question:
As an addendum to this question:
Writing a file as someone else
I have written the following admittedly dangerous script:
This is the result I get on the screen:#!/usr/bin/perl use CGI; $q = new CGI; $directory = '/home/httpd/html/antonh/testdir'; print $q->header, $q->start_html, "Removing $directory<br>"; $result = system("rm -r $directory"); print -W $directory,",", -o $directory,",",$result;
Removing /home/httpd/html/antonh/testdir
1,1,256
This script does work from the command line, but for some reason the system call is failing. I had similar problems trying to do a chmod in the same way.
Any ideas why this might be the case?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why aren't system() calls working?
by ChOas (Curate) on Dec 15, 2000 at 11:46 UTC | |
|
Re: Why aren't system() calls working?
by chipmunk (Parson) on Dec 15, 2000 at 20:15 UTC | |
|
Re: Why aren't system() calls working?
by eg (Friar) on Dec 15, 2000 at 11:47 UTC | |
by hotyopa (Scribe) on Dec 15, 2000 at 11:51 UTC | |
|
Re: Why aren't system() calls working?
by Fastolfe (Vicar) on Dec 15, 2000 at 20:39 UTC |