Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: deleting files created via cgi

by dree (Monsignor)
on Dec 07, 2002 at 23:31 UTC ( #218303=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: deleting files created via cgi
[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 --

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://218303]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-12-17 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (40 votes), past polls