I’m setting up my Dislikes application and using Yii’s Gii to generate my models and controllers, but I’m getting the following errors:

generating controllers/UserController.php
    Unable to write the file '[Application Path]/protected/controllers/UserController.php'.
generating views/user/index.php
    Unable to create the directory '[Application Path]/protected/views/user'.

To solve this, I need to set the permission of the following directories to 777 on my dev machine, and change the permission to more restrictive when I upload the project to the production server

  • models
  • controllers
  • views