title: file_put_contents(meta/services.json): failed to open stream: Permission denied
body: <p>I am new to Laravel. I was trying to open <code>http://localhost/test/public/</code> and I got </p>
  
  <blockquote>
    <p>Error in exception handler. </p>
  </blockquote>
  
  <p>I googled around and changed the permission of storage directory using <code>chmod -R 777 app/storage</code> but to no avail.</p>
  
  <p>I changed <code>debug=&gt;true</code> in <code>app.php</code> and visited the page and got Error in exception handler: </p>
  
  <blockquote>
    <p>The stream or file "/var/www/html/test/app/storage/logs/laravel.log"
    could not be opened: failed to open stream: Permission denied in
    /var/www/html/test/bootstrap/compiled.php:8423</p>
  </blockquote>
  
  <p>Then I changed the permissions of storage directory using the command <code>chmod -R 644 app/storage</code> and the 'Error in exception handler' error was gone and a page is loaded. But in there I am getting this: </p>
  
  <blockquote>
    <p>file_put_contents(/var/www/html/laravel/app/storage/meta/services.json):
    failed to open stream: Permission denied</p>
  </blockquote>