WordPress upload permissions on IIS 7 Fix

01/18/2011 | By | 18 Replies More

This article will explain how to fix the permission problem on uploaded files in WordPress running on IIS 7.

I was having the same problem as you.  You upload an image in WordPress and either you get an error or the image will upload, thumbnails would work but the actual image would not have read permissions. I’m not an IIS or WordPress expert but after a ton of searching and trying things that didn’t work, this is what worked for me.

If you can’t upload an image at all, it’s probably because you need to give the IUSR account Read/Write/Modify permission on your wp-content folder.  This will allow you to upload, and do the WordPress & plugin updates.

Once you have done that, all you need to do is give the IIS_IUSRS group Read permissions on your “C:\Windows\Temp” folder.

Make sure to notice that the two permission changes you make are not for the same user/group.   Give IUSR permissions on your wp-content folder and IIS_IUSRS permissions on your Windows temp folder.

Note: If you have edited your php.ini file and change the upload temp directory then you will need to give IIS_IUSRS group read permissions on that folder instead.

That should do it, or at least it worked for me.

If you’re still having problems, here is something else you can try.  When I was having problems with my uploaded images I noticed that even though IUSR had permissions on my uploads folder they weren’t propagating to the newly uploaded files.  The other thing I noticed was that when a new image was uploaded the Owner of the new file was IUSR, and instead of giving IUSR the permissions that I had assigned for the parent folder it seemed to copy the permissions from “CREATOR OWNER” and assign them to IUSR for the upladed file.  “CREATOR OWNER” doesn’t really have any rights so the next thing I was going to try is to give “CREATOR OWNER” Read/Write/Modify permissions on my uploads folder.  Maybe these new permissions would get copied and assigned to IUSR for new uploads?  Worth a try anyway.

Tags: , ,

Category: Internet

About the Author ()

Comments (18)

Trackback URL | Comments RSS Feed

  1. Ansego says:

    Thanks mate. Been stressing over this for 2 days… Now finally working well. Keep up the good work.

  2. Mike says:

    Thanks for the post. Are there any security issues with giving IUSR write permissions to WP-content? Is there a scenario where an anonymous user will be able to write files to your WP-content directory?

    • Chris says:

      I’m not an expert but I guess if there was a flaw with WordPress that someone figures out how to take advantage of then it’s possible. I don’t think it’s necessary to give write access to the entire wp-content folder except for WordPress updates. You could do the updates manually if you’re concerned about it.

  3. Adrian Parr says:

    Thank you so much! Giving the IIS_IUSRS group Read permission on the “C:\Windows\Temp” folder worked for me. :-D

  4. Doug says:

    Big time thanks, Chris. This worked beautifully.

  5. Dave says:

    Thanks for taking the time to post this Chris – works perfectly and fixes the problem that was bugging me for a while!

  6. It worked!Thank you so much for this!!

  7. Brett says:

    This Works…I have been searching high and low for a solution. THANK YOU FROM THE BOTTOM OF MY HEART :)

  8. Roberta says:

    It worked!Thank you so much for this!!

  9. Phil says:

    YOU NAILED IT!!! After 7 hours of setting and resetting permissions…Your advice NAILED IT!

    Thanks!

  10. Thanks a lot for the post, just found it after I solved the problem myself ;)

    Just as an addition: It’s possible to make those changes through the Plesk Panel as well.

    The user you have to give read and write permissions on the wp_content folder is called “Plesk IIS Anonymous Account (IUSR_domainuser)”.

    If you got error messages like “Unable to create directory – Is its parent directory writable by the server?” or “The uploaded file could not be moved to” this will fix it.

  11. Chad says:

    My problem was that I could not install new WordPress plugins in IIS7. I would always receive a 500 error. After 3 hours of Google searches I came across you’re advice. I was completely skeptical thinking i doubt he has the solution. I tried it and it works! I can install plugins without any problem now! Thank you very much!

  12. Vic says:

    Thank you! I set read-only permission to the windows\temp dir and all is well! Thanks for a great post.

  13. Joseph says:

    Worked just as it said it would. Was fussing with different settings trying to get this to work until I came across your article on how to do this. Thanks for the assistance.

  14. Catherine says:

    Thank you so much for this posting. All of the other “fixes” I had read only mentioned modifying permissions on the uploads folder. It wasn’t until we went up a folder to “wp-content” that it finally worked for us.

  15. rtpHarry says:

    Note: If you are using plesk then you should do this by navigating to the “file manager” section under the hosting section within plesk (its in lots of different places depending on the version you are running so just have a dig).

    Navigate to the wp-content folder, edit permissions (click the lock), and the user that you need to edit is IUSR_SiteNameHere where SiteNameHere will be something to do with your site name that you’re editing.

    I haven’t come up against the windows temp issue yet.

  16. Chris says:

    I wonder if you set the permissions correctly. Glad you got it working anyway.

  17. Patrick says:

    This didn’t work for me.

    It turned out though, that I had to change the uploads temp dir in my php.ini file to something different. I just made a new custom c:\phptemp dir and gave that modify permissions for IUSR.

Leave a Reply