deployer icon indicating copy to clipboard operation
deployer copied to clipboard

var/page_cache as writable_dirs

Open gizamichal opened this issue 2 years ago • 1 comments

It will fix following Zend exception after successful deployment: Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/path/to/www/releases/7/var/page_cache" is not writable in /path/to/www/releases/7/vendor/magento/zendframework1/library/Zend/Cache.php:209 This exception does not occur on every environment, as always, it depends on PHP pool user/group (default www-data or owner of project directory).

gizamichal avatar Jul 19 '22 16:07 gizamichal

For example, you can restore described exception after Caddy provisioning using Deployer's recipe.

Local Caddyfile PHP configuration: php_fastcgi * unix//run/php/php7.4-fpm.sock

var/page_cache permissions: drwxrwxr-x 3 deployer deployer 4096 Jul 19 16:32 page_cache

php7.4-fpm.sock permissions: srw-rw---- 1 www-data www-data 0 Jul 19 15:42 /run/php/php7.4-fpm.sock

gizamichal avatar Jul 19 '22 16:07 gizamichal