Yii Framework Forum: File permissions are right, but not working - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

File permissions are right, but not working All files have at least 775 permissions, but still a no-go

#1 User is offline   Seth M 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-August 12

Posted 14 August 2012 - 05:16 PM

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.

#2 User is offline   rAWTAZ 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 102
  • Joined: 08-January 10

Posted 20 November 2012 - 06:15 AM

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

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users