File Upload error

Hello When I am trying to execute the file upload code, I am getting the following error. I have attached the file upload php code in the attachment.
How can I solve this error?

The error is:

Results: File Upload

Warning: move_uploaded_file(/web/users/k0171569/RAY_junk/tsunami4.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /web/users/k0171569/inc/fupload.php on line 125

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpa8oayT' to '/web/users/k0171569/RAY_junk/tsunami4.jpg' in /web/users/k0171569/inc/fupload.php on line 125

ERROR: RAY_junk/tsunami4.jpg NOT SAVED - SEE WARNING FROM move_uploaded_file() COMMAND
fupload.php
krutarth941Asked:
Who is Participating?
 
brutaldevConnect With a Mentor Commented:
Step 1: If the specific user does not appear in the list then add it. If the Add button does not appear you may have to click the Edit button first.
 Security tabStep 2: Click the advanced button to search for the user on the local machine (if you know the full name skip this)
 Advanced option or type in the nameStep 3: Just click Find Now and look for IIS_IUSRS in the list. The location should be your machine name.
 Find the IIS_IUSRS userStep 4: Click OK on the screenshot from Step 2.
Step 5: Set the Modify and Write permissions for the user you just added.
Set the correct write permissions for the user
0
 
brutaldevCommented:
You need to set sufficient write permissions on /web/users/k0171569/RAY_junk/.

If you are using IIS and Windows set write permissions on the folder for the IIS worker process user. If you are using Apache and Linux then use the CHMOD command to change the permissions.

CHMOD examples for your issue can be found here: http://www.astahost.com/info.php/Problem-Move_uploaded_file_t18152.html
0
 
krutarth941Author Commented:
Hello brutaldev, thanks for the information.
I am using windows. Could you please explain me in brief about how to set write permission?
0
 
brutaldevCommented:
No problem, it's actually quite easy in Windows. To avoid a long winded explanation just follow the instructions in this article or for a more visual guide check this page. The steps may be slightly different in newer versions of Windows but the concepts remain the same and the articles are specific to PHP as well so it's in the right context.
0
 
krutarth941Author Commented:
Hello brutaldev,I am trying to set the folder permission.
However,In the security tab of the folder,  Internet Guest account and launch IIS process account options are not abailable.
What should I do in this case?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.