Php – YII framework permissions issue on IIS 7.5 server

iis-7.5PHP

I have a Windows Server 2008 R2 machine with the IIS Web server role installed. I didn't check any of the tickboxes apart from the default selection for the install and IIS was downloaded and installed from php.iis.net using the Web Platform Installer.

I have copied the files for the site (Multicraft Control Panel) to wwwroot and navigated to localhost but recieve an error :

Application runtime path "C:\inetpub\wwwroot\panel\protected\runtime"
is not valid. Please make sure it is a directory writable by the Web
server process.

The folder it refers to exists and the IIS_IUSR has read/list/execute permissions. I guess this is, however, a permissions issue as if I set that whole wwwroot\panel folder to "everyone" and "full control" the page loads without issue. I would not want to use this setting though due to the security issue. I've gathered so far it could be due to something called the YII framework but still need help in which process or account(s) should be granted access to the folder.

Best Answer

In IIS 7.5, the application pool for the default website runs as IIS AppPool\DefaultAppPool. If that's the account running your app pool, that's what you need to grant rights to. This is documented on IIS.net if you want to read further.

You can change that to any user account you want, and best practices are to run each application pool under a different identity, but that's probably a step for after you solve this first problem.

Related Topic