note 23868 deleted from function.move-uploaded-file by didou
| From: | didou@php.net | Date: | Thu, 18 Sep 2003 14:09:02 +0000 |
| Subject: | note 23868 deleted from function.move-uploaded-file by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56698@lists.php.net to get a copy of this message | ||
Note Submitter: kdechant@midwestarts.com
----
A followup to my note above about the files having a mode 600 and owner nobody:
I handle this by calling the PHP chmod function immediately after saving the file. Here is an
example:
move_uploaded_file($temp_filename, $destination_filename);
chmod($destination_filename, 0644);
Mode 0644 (the zero is required) will allow everyone to read but not modify the file. That allows
you to download it with FTP. You can use 0666 if you need to overwrite the file with FTP, but that
is probably less secure.