Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aalrashid's avatar

php artisan cache:clear (have the appropriate permissions.)

Dear ALl i run php artisan cache: clear on my Mac get on the terminal message's error (Failed to clear cache. Make sure you have the appropriate permissions. ) and i am laravel 5.7 thank you all

0 likes
6 replies
TECreasey's avatar

Adding a data file fixed the error but my env data still hasn't refreshed.

jim1506's avatar

I had this problem also with Windows10 but adding the data fixed worked

goncoolio's avatar

Make php artisan config:cache and Php artisan cache:clear

1 like
prolinkzee's avatar

I learnt various methods, using terminal as well manually deleting cache files but here is the 3 simple steps to resolve the issue. You need to UPDATE the cache folder owner:

  1. get user name by this command : whoami // my output: prolink
  2. Run the below command if "data" folder exists in the cache directory. but if not, create 'data' name folder under storage/framework/cache/
  3. NOW RUN: sudo chown -R prolink:prolink storage/framework/cache/data/

NOW RUN: php artisan cache:clear

1 like

Please or to participate in this conversation.