note 89607 deleted from function.move-uploaded-file by thiago
| From: | thiago@php.net | Date: | Mon, 16 Mar 2009 19:21:33 +0000 |
| Subject: | note 89607 deleted from function.move-uploaded-file by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152003@lists.php.net to get a copy of this message | ||
Note Submitter: sampablokuper
----
One of the commenters said, 'Don't forget to set chmod to 777 for the directory to which
you want to move the file. Otherwise you will maybe get "failed to open stream: Permission
denied in ..."!'
A more secure approach is to chmod the directory to 755 and chown it to the user who will be doing
the uploading, e.g. www-data. For example, at the command line you would ls to the directory above
the upload directory and type:
chown www-data my_upload_directory; chmod 755 my_upload_directory
Then press enter.