check error_log:
Fatal error: Uncaught Magento\Framework\Exception\FileSystemException: The "/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Proxy.php" file can't be deleted. Warning!unlink(/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Proxy.php): Permission denied The "/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Config/Proxy.php" file can't be deleted. Warning!unlink(/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Config/Proxy.php): Permission denied The "/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Config/Reader/Proxy.php" file can't be deleted. Warning!unlink(/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Config/Reader/Proxy.php): Permission denied The "/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Interceptor.php" file can't be deleted. Warning!unlink(/var/www/magento2/generated/code/Magento/Framework/App/ResourceConnection/Interceptor.php): Pe in /var/www/magento2/vendor/magento/framework/Filesystem/Directory/Write.php on line 202
Solved! Go to Solution.
Hi @yongchao_ma
You need to provide access to var, pub, generated directory. Run this command on Magento root directory.
sudo chmod -R 777 var/ pub/ generated/
remove sudo if it will not work.
I hope it will work for you.
Thanks
--
If my answer is useful, please Accept as Solution & give Kudos
Hi @yongchao_ma
You need to provide access to var, pub, generated directory. Run this command on Magento root directory.
sudo chmod -R 777 var/ pub/ generated/
remove sudo if it will not work.
I hope it will work for you.
Thanks
--
If my answer is useful, please Accept as Solution & give Kudos
thank you。
It did not help me, writes the following:
chmod: cannot access 'generated/sudo': No such file or directory chmod: cannot access 'chmod': No such file or directory chmod: cannot access '777': No such file or directory
How to fix it?
Nor can I start this CMS ...
Vimal Parihar, Thanks, it helped, but not quite, now the whole design is gone, CSS is not working correctly, js page design does not load after installation, or rather, it does not display correctly.
What now?
In general, in my situation, the following was: when updating the system, its localization through the compressor, the .htaccess file is deleted from the pub/static folder.
I don’t know for what reason, but it is this file that disappears during updates, additions through the compressor. Add the file manually from backup and the problem was solved.
I recommend this if you have the same problems with the template!
In Centos7 with SELinux running you may also need to do this from your Magento web root
Otherwise SELinux decides your permissions break default policy on the server and will not honour them.
chcon -R -t httpd_sys_rw_content_t var/ pub/ generated/