[color="#1C2837"][size="2"]hello and welcome to Yii.[/size][/color]
[color="#1C2837"][size="2"]this two folders needs write permissions.
[/size][/color]
[color="#1C2837"][size="2"]C:\inetpub\wwwroot\demo\protected\runtime[/size][/color]
[color="#1C2837"][size="2"]C:\inetpub\wwwroot\demo\protected\assets[/size][/color]
[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]
[size="2"][color="#1c2837"]
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.
[/color][/size]