For example you did not mention on what system you are working… I can only guess it’s linux because you mentioned chmod…
I explained you what is the problem (permissions)… so now it’s just matter of googling how to set proper permissions for your system… and by doing that you will possibly learn how permission works so that you know in the future how and what to set them…
If anybody just gives you the command (solution) you could possibly just use that command and not learn anything from that…
I’m little late to the party. What worked for me is changing the ownership of the whole project, which probably isn’t a good idea for the security reasons.
Ubuntu 14.04
Position yourself in the project root and run a following command:
if you are using apache web Server in linux you must specify the folder and files permission to allow YII write and create php scripts. For exmaple you have the followin error:
Unable to write the file ‘/var/www/yii/framework/demo/protected/controllers/HelloController.php’.
You must execute the following commands in the terminal
change directory cd /var/www/YOUR_WEBSITE_FOLDER_/
change propetary and group folder’s sudo chown $USER:www-data -R controllers
change the Directory permission’s sudo chmod g+rwx -R controllers
and last restart the web server to changes take effect sudo service apache2 restart
After this you must be able to create CRUD operations
I has the same issue, and your solution makes sence to me, but I tried this and more and nothing at now, I don’t found at on document if this issue it’s some yii permission or apache permission.
When somebody knows will help me a lot.
Thanks!
ubuntu 18.04 it’s my system and the server it’s apache2