note 93602 added to features.file-upload

From: Date: Thu, 17 Sep 2009 20:54:44 +0000
Subject: note 93602 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-160808@lists.php.net to get a copy of this message
On a Microsoft platform utilizing IIS, you may run into a situation where, upon moving the uploaded file, anonymous web users can't access the content without being prompted to authenticate first... The reason for this is, the uploaded file will inherit the permissions of the directory specified in the directive upload_tmp_dir of php.ini. If this directive isn't set, the default of C:\Windows\Temp is used. You can work around this by granting the IUSR_[server name] user read access to your temporary upload directory, so that after you move_uploaded_file the permissions will already be set properly. It's also a good idea to set the Execute Permissions of the upload directory to NOT include Executables, for security reasons. To accomplish this: -Open the IIS Manager -Browse to the relevant sites directory where the uploads will be placed -Right Click the folder and select Properties -In the Directory tab of the resulting dialog, set the Execute permissions to be None This took me a while to figure out, so I hope this helps save some other peoples time. ---- Server IP: 69.147.83.197 Probable Submitter: 66.92.226.146 ---- Manual Page -- http://www.php.net/manual/en/features.file-upload.php Edit -- https://master.php.net/note/edit/93602 Del: integrated -- https://master.php.net/note/delete/93602/integrated Del: useless -- https://master.php.net/note/delete/93602/useless Del: bad code -- https://master.php.net/note/delete/93602/bad+code Del: spam -- https://master.php.net/note/delete/93602/spam Del: non-english -- https://master.php.net/note/delete/93602/non-english Del: in docs -- https://master.php.net/note/delete/93602/in+docs Del: other reasons-- https://master.php.net/note/delete/93602 Reject -- https://master.php.net/note/reject/93602 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160808) next »