title: Laravel: file_put_contents() permission denied — correct storage/framework/cache permissions?
body: <p>I'm having struggles with editing the Laravel cache, which is located in <code>storage/framework/cache</code>. I've got a job running that saves to a certain cache, but every time the job runs, this error occurs:</p>
  
  <pre><code>ERROR: file_put_contents(/var/www/html/---/storage/framework/cache/data/3c/c7/3cc7fd54b5a3cb08ceb0754f58371cec1196159a): failed to open stream: Permission denied
  </code></pre>
  
  <p><strong>Details</strong></p>
  
  <ul>
  <li>When I save to the same cache (e.g. with the same key, there is no error)</li>
  <li>I am running on <strong>nginx</strong></li>
  <li>Already have I run this command <code>sudo chown -R www-data:www-data storage</code> in the folder the Laravel application is located, as well as <code>sudo chmod -R 775 /home/&lt;user&gt;/&lt;laravel folder&gt;/storage</code></li>
  <li>Performing <code>ls -lh /storage/framework/cache</code> returns the following: <code>drwsrwsr-x 55 www-data www-data 4.0K Jan 18 20:56 data</code>.</li>
  <li>Now I'm just wondering what the full, correct, Laravel permission set is and how to restore that set-up.</li>
  </ul>
  
  <p>Any help is appreciated! Thank you in advance.</p>