note 55958 added to features.file-upload
| From: | warwickbarnes at yahoo dot co dot uk | Date: | Thu, 18 Aug 2005 23:58:42 +0000 |
| Subject: | note 55958 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93859@lists.php.net to get a copy of this message | ||
You may come across the following problem using PHP on Microsoft IIS: getting permission denied
errors from the move_uploaded_file function even when all the folder permissions seem correct. I had
to set the following to get it to work:
1. Write permissions on the the folder through the IIS management console.
2. Write permissions to IUSR_'server' in the folder's security settings.
3. Write permissions to "Domain Users" in the folder's security settings.
The third setting was required because my application itself lives in a secure folder - using
authentication (either Basic or Windows Integrated) to identify the users. When the uploads happen
IIS seems to be checking that these users have write access to the folder, not just whether the web
server (IUSR_'server') has access.
Also, remember to set "Execute Permissions" to "None" in the IIS management
console, so that people can't upload a script file and then run it. (Other checks of the
uploaded file are recommended as well but 'Execute None' is a good start.)
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55958
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55958&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55958&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55958&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55958&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55958&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55958&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55958&report=yes
Search -- http://master.php.net/manage/user-notes.php