0

I upgraded my 2.1.0 store from the Admin and the console stated it completed successfully. However my Admin and frontend are now displaying the following error:

Fatal error: Uncaught exception 'Magento\Framework\Exception\FileSystemException' with message 'The file "/home/extende/public_html/var/generation/Magento/Theme/Model/ResourceModel/Design/Config/CollectionFactory.php" cannot be deleted Warning!unlink(/home/extende/public_html/var/generation/Magento/Theme/Model/ResourceModel/Design/Config/CollectionFactory.php): Permission denied' in /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php:382 Stack trace: #0 /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/home/extende/p...') #1 /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/home/extende/p...') #2 /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/home/extende/p...') #3 /home/extende/public_html/vendor/magento/framework/Filesy in /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php on line 382

2
  • Have you try update your file permission? From the error message, I think it worth a try.
    – Nero
    Aug 31, 2016 at 7:18
  • You cannot change the permissions of the file. Aug 31, 2016 at 7:39

1 Answer 1

1

I would recommend the composer way to install and upgrade Magento 2. It seems to be a problem with di:compile.

Go to your console and do the following:

rm -Rf vendor
rm -Rf pub/static/*
rm -Rf var/generation/*
rm -Rf var/cache/*
composer install
composer update
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy

These commands will delete every generic data and compile them again. If there were any problems while updating magento, you will see them while downloading your dependencies via composer.

Please be careful with the rm -Rf commands and never delete any .htaccess-File.

Hope this will help.

7
  • When I execute the command bin/magento setup:upgrade it says "Permission denied" ? Aug 31, 2016 at 7:50
  • So that means that you dont have permissions. Are you sudo on your system? Try sudo php bin/magento setup:upgrade Aug 31, 2016 at 8:20
  • I am not on sudo. I have had a look at update.log and found errors: [2016-08-31 07:44:03] update-cron.ERROR: Cron readiness check failure! Found non-writable paths: /home/extende/public_html/.htaccess Aug 31, 2016 at 8:26
  • What kind of setup do you have? You need to be sudo to install, update and maintain Magento 2 correctly. Aug 31, 2016 at 8:44
  • Usually I use the command bin/magento setup:upgrade and it works fine. Aug 31, 2016 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.