unlink(), safe mode, and other woes
| From: | Jan De Luyck | Date: | Fri, 17 Aug 2001 13:25:54 +0000 |
| Subject: | unlink(), safe mode, and other woes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63180@lists.php.net to get a copy of this message | ||
Hello all,
I've ran across a little problem.
I've created a site for our gameing group, and added a section to upload
screenshots.
The webhost where I've put it is F2S, which have PHP support and also the
php_safe restrictions active. This gave me a little problem in fixing the
uploading, but that was done in no-time using the move_uploaded_file and the
like.
Now I'm having another problem: I would like to offer the ability to remove
these files, using unlink(). Now, when issueing an unlink() on a file
uploaded by another script, I get this error:
Warning: SAFE MODE Restriction in effect. The script whose uid is 97613 is
not allowed to access testscreen.jpg owned by uid 1001 in
/path/to/script.php on line 3
The offending line is
unlink("shots/testscreen.jpg");
After doing a bit of checking, I've found out that the webserver process
seems to be running
on user www/www - thus the uploaded files are also owned by that user.
Anyone got a clue?
Thanks,
Jan De Luyck