Newbie problem - folder permissions

Im new to PHP framworks and Yii. Ive installed the yii demo on a Windows 7 machine with IIS, and under C;/inetpub/wwwroot/, and just cant get it to run. I get the error message…

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

As the folder exists, I guess it must be a permissions problem. Now Ive changed permissions on the folder

so that it is writable by the group/user IIS_IUSERS (in fact, this group/user now has full permission) … but the problem remains. Ive also changed the permissions on parent folders, ie …/protected and …/…/demo … but again, the problem remains.

I cant get anywhere with this and am just about ready to give up. Any suggestions ?

[color="#1C2837"][size="2"]hello and welcome to Yii.[/size][/color]

[color="#1C2837"][size="2"]this two folders needs write permissions.




[size="2"][color="#1c2837"]how it works:[/color][/size]

[size="2"][color="#1c2837"]Your ISS service, or your Apache service, or any service that holds your www service, runs under an account, if this account has no permissions, then it will receive a code 0x00000005 (access denied, this is a code that Microsoft uses to report the access denied)[/color][/size]

[size=“2”][color="#1c2837"]1-restart your PC because windows has a problem with variables currently loaded at startup on services, this can include the permissons (the DACL’s), so, restarting your pc will be a nice start point after setting the adecuated permissions levels on your folder.[/color][/size]

[size="2"][color="#1c2837"]2-check that your user has administrative privileges (is not secure to run with it, but for troubleshooting is necesary, at least temporary)[/color][/size]

[size="2"][color="#1c2837"]3-if you set the adecuated permissions, and you restart, and…the problem persists, then:[/color][/size]

  • [color="#1C2837"][size="2"]open services.msc from the start menu / run[/size][/color]
  • [color="#1C2837"][size="2"]look for the ISS service, and check what is the user name that it has configured (example: IWAN_USER_XXX)[/size][/color]
  • [color="#1C2837"][size="2"]check that specifically this account (IWAN_USER_XXX) has modify permissions in your two folders (assets and runtime, or its parent),

if dont, then force this user to have the modify permissions.[/size][/color]


as extra steps, right click this two folders, and check that are no read-only marked.[/color][/size]

[color="#1C2837"][size="2"]as a final solution, you can set your administrator user name and password on the service settings (start menu / run / services.msc / iss_service / tab run-service-as-user: blabla ) , in order to force the ISS service to run with the credentials that you specify. Please note that this will be made if all other things dont work…but the problem will be the same: "an access denied for the ISS service to write or create this folders"[/size][/color]

[size="2"][color="#1c2837"]This problem can have many causes.


Thanks. Ive fixed it now. It seems that anonymous authetication is configure to use IUSR, not IIS_IUSERS. So I just added IUSR as a user and gave it write permission.

is a good practice to provide the real name of the -windows account- that holds the IIS Service, in order to others can solve this issue too.