You need to delete the contents of your cache
folder (and also the logs
folder, if necessary) and then reconfigure the permissions of the folder.
For systems that support chmod +a
:
$ rm -rf app/cache/*
$ rm -rf app/logs/*
$ HTTPDUSER='ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1'
$ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
$ sudo chmod +a "'whoami' allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
For systems that do not support chmod +a
:
$ rm -rf app/cache/*
$ rm -rf app/logs/*
$ HTTPDUSER='ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[
w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1'
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:'whoami':rwX app/cache app/logs
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:'whoami':rwX app/cache app/logs