I’m a noob and running through a Yii tutorial on AWS. So far I’ve been able to get everything up and running - including mysql connection. But now I’m using the Gii code generation tool to help create some model classes. In doing so, I’m getting the following error:
generating models/User.php
Unable to write the file '/var/www/html/blog/protected/models/User.php'.
done!
The documentation also tells me:
Info: Because the code generator needs to save the generated code into files, it is
required that the Web process have the permission to create and modify the corresponding
files. For simplicity, we may give the Web process the write permission to the whole
/www/blog directory. Note that this is only needed on development machines when using Gii.
This makes sense to me and I understand the basic logic of Linux permissions as applied to users and groups … but not processes. Can someone point me to a primer on how to give the Gii process write permissions to the webroot (in my case:/var/www/html/blog/) directory?
I’ve read and understand the danger of running Gii on a production server. However, the ip filter setting in the config/main.php file is set to only allow Gii to be run from my public ip address. So running a live AWS instance (as opposed to WAMP localhost) seems like it would still be safe.
Also, I made the mistake of trying a quick fix without properly understanding it and did … chmod -R 0644 /var/www/html/blog/ … and I cannot access the page now which means I’ve shut down the application. … HELP!!