safe_mode on and upload file

From: Date: Wed, 06 Oct 1999 09:51:24 +0000
Subject: safe_mode on and upload file
Groups: php.dev 
Request: Send a blank email to php-dev+get-11566@lists.php.net to get a copy of this message
Hi, I had no answer on any list, so I ask it here. I use the safe mode with PHP, and when I try to use uploadfile, it does not work because the uploaded file in /tmp/ is owned by the same uid that Apache use (www-data) and my script is owned by me (penso). So basicly if I use the safe mode, I can't offer my users to use upload file ? The only solution I found for now is to manually make their scripts owned by www-data, but then I got a security hole. Also the error message I got is: PHP 3 Warning: SAFE MODE Restriction in effect. The script whose uid is 1000 is not allowed to access /tmp/php30288aaa owned by uid 0 in /opt/apache+php/htdocs/news/submit.phtml on line 137 As you see it tells me /tmp/php30288aaa is owned by 0 (root) which is not right, it is owned by 33 (www-data). So the error message has an error :) Please tell me if their is a solution for thoses upload files. Thanks ! Fabien Penso <penso@linuxfr.org> - http://perso.LinuxFR.org/penso/ http://LinuxFR.org/ - Geek Stuff ! -[ Association Loi 1901 ]-

« previous php.dev (#11566) next »