I am running WordPress on Win2k8/IIS7 (using httpcache, fastCgi & UrlRewriter 2.0) installed via WPI. Everything seems to be working fine (uploads, posting via Live Writer, comments, plugins, pretty URLs).
I am trying to update WordPress to the latest version, but I get an error like this:
Download failed. Destination directory for file streaming does not
exist or is not writable
This is the same error that I get when trying to download a theme or update a plugin.
There are no errors in the event log and WordPress isn’t really telling me which directory it’s looking for, what user it thinks it’s using or what permission it is lacking.
I have double (and triple) checked that the IIS App Pool user is explicitly set, and that the directory has modify permissions for that user, and finally that those permissions have been propogated down to sub folders.
At the advice of Dr. Google, I have also added the following settings to the config file:
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
define('FS_METHOD', 'direct');
Am I missing a config option or a setting? Does WordPress require the sacrifice of a small kitten and/or an Algerian degu?
From the PHP manual on IIS7 installation (emphasis mine):
As discussed in the “Should I impersonate PHP via FastCGI?” question on ServerFault, there are security concerns if you would grant the anonymous user write access rights on your server. For instance, if you have also enabled the WebDAV module, anyone could write to your directories using this protocol!
Therefore my recommendations are:
ApplicationPoolIdentity
.fastcgi.impersonate = 0
, so PHP runs under the Application Pool Identity as set in IIS.This way, all PHP scripts are ensured to run under a system account, tied to the Application Pool of the site (isolating it from other sites), and cannot accidentally get too public access via impersonation.
Correct me if I’m wrong but I believe the following configuration provides the same benefits, and also honors PHP’s desired setting of fastcgi.impersonate=1.
Steps 1,2 and 4 are the same – step 3 is different.
We do not grant IUSR or IIS_IUSRS access to the webroot. All permissions are assigned to IIS AppPoolMyAppPoolName