3

I own an IIS server where I have hosted a simple WordPress website. I have made this website available to the internet over port 80.

Almost everything is working fine, except the permissions that are set on files I upload to WordPress using the CMS itself.

The IUSR, IIS_IUSRS and Network Service users have Full Control over the entire WordPress directory, however, when I upload new files, the permissions aren't inherited.

Basically WordPress generates a thumbnail, which I can access. But when I try to select the actual uploaded image, the image is not recognized. When I go to my directory on the IIS server, I see that the user accounts mentioned above don't have permissions on this new image at all. When I inherit the permissions again, I am able to select the image again.

I've looked all over the internet and tried solutions like changing the owner of the WordPress directory and changing the Anonymous Authentication user account, but unfortunately nothing is working.

Does anybody of you have any suggestions?

  • 1
    You may need to change the permissions on the Temp directory – czerspalace Jul 31 '17 at 19:32
  • 1
  • @czerspalace Unfortunately this did not work, but thanks for your comment! – Toine-L Aug 1 '17 at 20:23
  • @czerspalace I checked your solution once again, this time it worked. Don't know what I did wrong the first time... Thanks! – Toine-L Aug 24 '17 at 16:21
  • @czerspalace That fixed the same problem for me, too. You should add it as an answer so I can upvote it! – Rich Jul 5 at 10:14
0

IIS does not by default add index.php to the list of accept default documents. IIS will also not allow for directory browsing. This is critical for Wordpress to run correctly. To solve this, locate the web.config file in the root of the hosting space. If it does not exist, create one and add the following commands.

<?xml version="1.0" encoding="UTF-8"?>
 <configuration>
  <system.webServer>
  <directoryBrowse enabled="false"/>
  <defaultDocument>
  <files>
    <clear/>
    <add value="index.php"/>
    <add value="Default.htm"/>
    <add value="Default.asp"/>
    <add value="index.htm"/>
    <add value="Default.aspx"/>
  </files>
</defaultDocument>
<rewrite>
  <rules>
    <rule name="wordpress" patternSyntax="Wildcard">
      <match url="*"/>
        <conditions>
          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
        </conditions>
      <action type="Rewrite" url="index.php"/>
    </rule>
  </rules>
</rewrite>
</system.webServer>
</configuration>
  • Thanks for your response, I tried this and restarted IIS. Unfortunately this did not resolve the error. Images uploaded still have different permissions in the uploads folder. – Toine-L Aug 1 '17 at 20:24
0

I found that IIS DOES now include INDEX.PHP and that the solution was to modify the location and permissions of the WordPress uploads folder. https://www.urtech.ca/2018/04/solved-500-error-on-downloads-in-wordpress-running-on-iis/

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.