title: Laravel Storage Cache folders owned by root causes fail in clearing cache
body: <p>I have a laravel 7 application running on a server (Ubuntu 18.04 LTS, apache2 webserver). My problem is, that <code>php artisan cache:clear</code> does return &quot;Failed to clear cache. Make sure you have the appropriate permissions.&quot;</p>
  <p>I tried the following approaches without success:</p>
  <ul>
  <li><code>chmod -R 775 storage</code></li>
  <li><code>php artisan config:cache</code></li>
  <li>manually deleting &quot;bootstrap/cache/services.php&quot; + &quot;bootstrap/cache/packages.php&quot; + &quot;bootstrap/cache/config.php&quot;</li>
  </ul>
  <p>New created cache folders in &quot;storage/framework/cache/data&quot; are sometimes owned by user root, this seems to be the problem.</p>
  <p>If I delete these folders manually it works till new root folders are created.</p>
  <p>With <code>ps -aux</code> I saw that the laravel process was running from user root. I changed this with <code>sudo -u myusername</code>, but this didnt change the behaviour. I am starting the laravel application (<code>php artisan serve</code>) within the rc.local script on server restart.</p>
  <p>The current user &quot;myusername&quot; is in the group www-data.</p>