I've deployed my Laravel 5.1 app using Amazing Beanstalk and after repeated usage I eventually get this error.
"file_put_contents(/var/app/current/storage/framework/cache/d4/d7/d4d77eddeb64100f6da8f8b601a4631b): failed to open stream: Permission denied"
In my .ebextensions config file I've tried adding this command to deployment but it does not solve the problem since the files seem to get created after deployment as the site is browsed.
container_commands:
"02-chmod-storage":
command: "cd /var/app/ondeck; chmod -R 777 storage"
How can I fix this permanently?
This should do it:
Try setting the ACL permissions on /storage allowing rwx access for root and webapp (or username of running web server):