http://qs321.pair.com?node_id=218303


in reply to deleting files created via cgi

> How would I delete a file that is created outside of the script?

You can't, because your script is running under apache that is "nobody", i.e. from a user that is different from the user you login into the server.

You have to chmod 666 (i.e. -rw-rw-rw) the files from the script after their creation.

To delete files that you have created before this "patch", write another CGI that sets all the existing files to 666. Then you can delete it from the login user.

Replies are listed 'Best First'.
[OT] Apache & 'nobody'
by vek (Prior) on Dec 08, 2002 at 00:43 UTC
    ...because your script is running under apache that is "nobody"...

    Well, one would hope that Apache is at least running scripts as a non-privileged account. I had the misfortune recently to come across an Apache installation on one of our Solaris boxes that was running scripts as root. A quick phone call to the sysadmin followed by some httpd.conf tweakage soon cleared that one up thankfully ;-)

    -- vek --