Re: Can not delete files that were uploaded

From: Date: Sun, 14 Jul 2002 01:45:44 +0000
Subject: Re: Can not delete files that were uploaded
Groups: php.general 
Request: Send a blank email to php-general+get-107566@lists.php.net to get a copy of this message
>I use PHP to upload files to the web server via web browser. However, I can >not delete the files later cause the Redhat linux server running on safe >mode. Do I have to changed the owner of the file during the file uploading >time? > >Please let me know how to solve this problems. The files are going to get deleted unless you do something in the upload script to save/store/copy them. There is no problem. :-) If, after you have created/moved them, you can't delete them, then you need to have done stuff like: http://php.net/umask http://php.net/chmod and have the correct settings on the source/destination directory permissions to get the files in the state that you want them in -- Whether that's deleting via a cron job, or manually or letting PHP do it. Be warned that if PHP can delete them, so can anybody else on the shared server who wants to write a PHP script to delete them, unless you've configured PHP specially to run as a specific user, which is unlikely for most ISP setups. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#107566) next »