note 89608 added to function.move-uploaded-file
| From: | sampablokuper at osu1 dot php dot net | Date: | Mon, 16 Mar 2009 19:14:38 +0000 |
| Subject: | note 89608 added to function.move-uploaded-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152002@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 92.48.74.199
Probable Submitter: 131.111.21.21
----
Manual Page -- http://www.php.net/manual/en/function.move-uploaded-file.php
Edit -- https://master.php.net/note/edit/89608
Del: integrated -- https://master.php.net/note/delete/89608/integrated
Del: useless -- https://master.php.net/note/delete/89608/useless
Del: bad code -- https://master.php.net/note/delete/89608/bad+code
Del: spam -- https://master.php.net/note/delete/89608/spam
Del: non-english -- https://master.php.net/note/delete/89608/non-english
Del: in docs -- https://master.php.net/note/delete/89608/in+docs
Del: other reasons-- https://master.php.net/note/delete/89608
Reject -- https://master.php.net/note/reject/89608
Search -- https://master.php.net/manage/user-notes.php