RuntimeException: Can't create directory /var/www/generated/code/Magento/PageCache/Model/App/Response/HttpPlugin/. Class Magento\PageCache\Model\App\Response\HttpPlugin\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. in /var/www/vendor/magento/framework/Code/Generator.php:135 Stack trace: #0 /var/www/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\PageCac...') #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\PageCac...') #2 [internal function]: spl_autoload_call('Magento\\PageCac...') #3 /var/www/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\PageCac...') #4 /var/www/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\PageCac...') #5 /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\PageCac...') #6 /var/www/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\PageCac...') #7 /var/www/vendor/magento/framework/Interception/PluginList/PluginList.php(250): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\PageCac...') #8 /var/www/vendor/magento/framework/Interception/Interceptor.php(119): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Magento\\Framewo...', 'response-http-p...') #9 /var/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Response\Http\Interceptor->Magento\Framework\Interception\{closure}() #10 /var/www/generated/code/Magento/Framework/App/Response/Http/Interceptor.php(117): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #11 /var/www/vendor/magento/framework/App/Http.php(185): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #12 /var/www/vendor/magento/framework/App/Http.php(156): Magento\Framework\App\Http->handleDeveloperMode(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #13 /var/www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #14 /var/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('catchException', Array) #15 /var/www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #16 /var/www/generated/code/Magento/Framework/App/Http/Interceptor.php(39): Magento\Framework\App\Http\Interceptor->___callPlugins('catchException', Array, Array) #17 /var/www/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->catchException(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #18 /var/www/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #19 {main}