I am working through Shawn McCool's book (great book) and each time I create a new view, and try to load it, I get a permissions error.
I am wondering why the views generated don't have read permissions. The odd thing is if I chmod
to 775, I still get the error, I have to 777 then 775.
Can anyone shed some light on this and why it's happening?
Thanks!
Edit:
Error after adding new view
file_put_contents(/Users/jason/Sites/laravel1/storage/views/5c4b7b4707d658dffe52d481be6c680e): failed to open stream: Permission denied
Permissions on storage/views
drwxrwxr-x@ 7 jason jason 238 Mar 7 17:15 views
Permissions on new view
-rw-r--r--
Error after chmod 775 views
file_put_contents(/Users/jason/Sites/laravel1/storage/views/5c4b7b4707d658dffe52d481be6c680e): failed to open stream: Permission denied
Permissions after chmod 775 views
drwxrwxr-x@ 7 jason jason 238 Mar 7 17:15 views
After chmod 777 views
, it works
drwxrwxrwx@ 8 jason jason 272 Mar 7 17:25 views
After chmod 777 views
it still works
drwxrwxr-x@ 8 jason jason 272 Mar 7 17:25 views
But here is the twist, I did not have this issue if I didn't use viewname.blade.php. If I did viewname.php, there was no error. It seems to have something to do with Blade.
Edit 2:
Related: always make sure to .gitignore these files so that you don't end up with cached views, etc. getting pulled onto your server from your dev environment.