Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony on AWS EB - Unable to write in the cache directory after cache clear

$
0
0

I am deploying a Symfony 4.4 app to AWS ElasticBeanstalk and noticed that the cache wasn't cleared after each deploy.

The app was running fine though, exception made to the stale cache.

To resolve the cache issue I added the following file:

/.ebextensions/deploy.config

container_commands:
    01-clear-cache:
        command: php bin/console cache:clear --no-warmup --env=prod

That seems to clear the cache but then somehow it changes permissions so that I then get the error when trying to access the app.

Fatal error: Uncaught RuntimeException: Unable to write in the cache directory (/var/app/current/var/cache/prod)

Why does running cache:clear changes permissions and is there a way to avoid that happening, or at least how to resolve afterwards, ie, in the same/another .ebextensions file?


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>