File permissions are right, but not working

I am not sure if I fully understand the proper file permissions for Yii to function properly. This is what I have done, it’s pretty straight forward.


[*]Running Ubuntu 12.04 (Desktop) with the tasksel LAMP installation.

[*]Created a VirtualHost file (copied the default) where the directory is now /home/seth/web/testapp/html

[*]I make ‘seth’ part of the ‘www-data’ group.

[*]I enabled the new site and disabled the default. Then proceeded to restart the Apache server.

[*]It’s all working wonderfully. localhost now connects to the new directory

[]With my framework folder outside my html (public) folder, I used yiic to create the default app inside the []html folder then give group permissions to ‘www-data’.

[*]The default application created by yiic is now displaying the pages.

[*]I moved the protected folder OUTSIDE the html folder and edited the index.php to reflect the change.

[*]I edited the main.php config file to enable gii and connect to the database.

[*]The database has one table, employee, which contains id, email, and password

[*]When I visit localhost/index.php?r=gii I can login (with my chosen password)

[*]When visiting the Model Generator page, I select the table name (employee) and name the class ‘Employee’.

[*]I click preview and am brought to a massive PHP warning page (I also enabled the error logging)

[]The error being displayed is: "file_put_contents(/home/seth/web/testapp/protected/runtime/gii-[]1.1.11/ModelCode.php): failed to open stream: Permission denied"

[*]Which is strange considering ALL protected files have at least 775 permissions.


If anyone can help with this, it would be appreciated. I am not sure what it means to give the "server process" rights to the directory.

Did you ever find out what caused this in your environment?