为什么 Concrete5 网站在 运行 c5:clear-缓存后返回错误 500?

Why Concrete5 website answers with an error 500 after running c5:clear-cache?

Concrete5 documentation 说:

Clearing the concrete5 cache is as easy as executing this command:

concrete/bin/concrete5 c5:clear-cache

但是在 运行 以 root 身份执行此命令后,网站会返回错误 500。为什么?

如果启用错误显示,您将看到:

Cache path is not writable

c5:clear-cache 命令未向 Web 服务器授予对缓存路径的写入权限。

您可以通过重置正确的所有权来解决此问题:

chown -R www-data:www-data /var/www/concrete5/application/files/ 
chown -R www-data:www-data /var/www/concrete5/application/config/
chown -R www-data:www-data /var/www/concrete5/packages/
chown -R www-data:www-data /var/www/concrete5/updates/