Support » Fixing WordPress » 3.5 on IIS7 unable to update plug-ins and themes

  • Prior to upgrading to 3.5, my IIS7 based wordpress was able to update plugins and themes. I’m sure over coming days there will be others with the same issue. Starting a troubleshooting thread.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Dion Hulse


    Core Developer

    What error messages are you getting?

    Does it prompt for FTP credentials?

    Did you upgrade to 3.5 via FTP manually, or via the auto-upgrader?

    This is the auto-upgrader.

    When updating themes:
    An error occurred while updating Twenty Eleven: Download failed. Destination directory for file streaming does not exist or is not writable..

    When updating plugins:
    An error occurred while updating A5 Custom Login Page: Download failed. Destination directory for file streaming does not exist or is not writable..

    On one of my sites, prior to upgrading to 3.5, I tested updating both plugins and themes. No issue. After upgrading to 3.5 I am having this issue. I’m running IIS7. And yes, the IUSER account is set, as per previous troubleshooting steps for the same issue in previous versions of WordPress.

    Dion Hulse


    Core Developer

    Alright, this sounds like it’s caused by some changes made in

    Specifically, this means that one of the temporary directories reported by PHP is unwritable by the IUSER account, or PHP is mis-reporting being able to create files in one of the temporary directories

    Would you be able to do a little bit of debugging for me?
    If you install this plugin (by FTP) and either paste the output here (If you’re happy letting the world know the file paths) or emailing the output directly to me at [email removed, see later posts], I’ll be able to work out if there’s a core bug, or if it’s just a server configuration issue.
    The plugin:

    (The plugin creates a top level menu called ‘Test Plugin’ )

    I encountered the exact same problem with WordPress 3.5 on a Windows (2003/IIS6) server. The RCA is that WordPress 3.5 now needs write access to the Windows TEMP directory. Adding write/modify permission immediately resolved this for me.

    If you’re using IIS6 you would add “IUSR_serverhostname” with Write & Modify permissions to your Windows temp directory (default is C:\Windows\TEMP). If you’re not sure what your temp directory location is, check the environment variables.

    If you’re using IIS7 you would add the “IIS_IUSR” account with Write & Modify permissions to your Windows temp directory (default is C:\Windows\TEMP). If you’re not sure what your temp directory location is, check the environment variables.

    Upon review of the defect in your bug tracker it appears this change might not have been fully thought out. The default configuration on Windows servers is to not allow the Internet Guest Account to have write access on OS dirs (incl. temp).

    Dion Hulse


    Core Developer

    The problem thats happened here, is that the is_writable() function in PHP has a few bugs, and doesn’t report correctly in some windows environments.

    We changed to using a special function – win_is_writable() which attempts to create a file in the directory in order to determine if a folder is writable, unfortunately, we didn’t update it in all the locations the is_writable() function was used.

    As a result of this, WordPress now attempts to use the Windows Temporary directory which, while already writable by PHP, is_writable() says isn’t (because it checks a different ACL flag than the filesystem actually uses).

    Finally, this renders WordPress updates & plugin/theme installs unusable.. an unfortunate side effect no one who had tested WordPress on windows had run into (apparently no-one who used the beta’s or RC’s had a IIS7 with limited write access to the Temp directories, and although I had tested IIS myself, I had temporary directory permissions set differently).

    This issue is being tracked in

    I hope someone who has been affected this will join the fun and test out WordPress 3.6 betas & Release Candidates next time, so that we’ll get better tester coverage and hopefully never run into a similar issue again.

    As a work around, if you don’t want to enable PHP write access to your temporary directory, you can add this to your wp-config.php file:
    define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/' );

    I’ll try the steps for setting permissions on the windows temp directory later this week and will post results.

    (IIS7) Added Modify/Write permissions to the C:\Windows\Temp folder for IIS_IUSR but this didn’t seem work. Do I need to restart the server or anything else?

    For now I’m using the define( ‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/’ ); workaround.

    With 3.5 on IIS 7.5 I had to deal with the following BUG in addition to the WP_TEMP_DIR problem:

    Just installed WP 3.5 and got the same error. As indicated in earlier posts, the issue is related to the IUSR account not having access to the Windows\Temp folder. However, after some testing, I found that the user does not need write access. In my case, I have the defaults (Read & Exec, List Folder Contents, Read) set and it works fine. I tested this by then removing the user and it failed again. So, just adding the IUSR to the folder will suffice. Looking fwd to 3.5.1 to get rid of this security hole…

    Here’s an example of the error you can expect to receive:

    Downloading update from name here]…

    Warning: touch() [function.touch]: Utime failed: No such file or directory in C:\websites\clients-a\astolfo\\wordpress\wp-admin\includes\file.php on line 179
    Unpacking the update…

    The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘C:\WINDOWS\TEMP/[plugin name here].tmp’

    Sorry for the delay, since I’ve been busy on non-wp related projects.

    Changing permissions to /%Windows%/Temp/ did not work, yet adding the following to the wp-config.php file did work:

    define( ‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/’ );

    Thanks again for your help!

    I can confirm I’ve seen this also on Windows Server 2003 and IIS6. The workaround of the define in wp-config.php also works.

    I am new to WordPress. I downloaded version 3.5.1. Whenever i try to install a theme, It gives me this Error Message ‘Missing a temporary folder.’. I have tried defining the path and also everyother suggestion but it all fails. can somebody please assist me.

    I am getting this error message the solution above doesn’t work… I am running Linux cPanel so it would be good that this is fixed in a update as I have 50 sites and I don’t want to be hard coding all the sites. Remember there are lots of novices who don’t know how to code and they’ll not be able to upload images…

    Dion Hulse


    Core Developer

    Please note, This particular issue is fixed in 3.5.1.

    If you are experiencing issues installing/updating plugins or themes, please open a new forum thread for your individual issue.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘3.5 on IIS7 unable to update plug-ins and themes’ is closed to new replies.