in reply to Why aren't system() calls working?

My guess is that the user your web-server is running as (nobody or www-data, most likely) doesn't have the proper permissions to do anything to your test directory. If you chmod 777 it from your command line, then the script ought to work from a browser.

Note, perl itself has a rmdir command, although you'd have to clear out the directory first (using File::Find or something.)


Huh? I thought you said the script ran fine from the command line, therefore I would hope that you somehow have permissions to play around with the test directory.

Nevertheless, a second thing you might check is to make sure that rm is in the script's path. Better yet, use a full path in your system call.

Have you checked the server's error log? What (if anything) does it say?

Replies are listed 'Best First'.
If I could I would
by hotyopa (Scribe) on Dec 15, 2000 at 11:51 UTC
    As per the earlier question, I can't chmod it from the command line because I'm not the owner and don't have root access...

    Also, the UID and GID that the script are running under are the owners of the directory and all files within.