Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't create directory #1870

Closed
comunidademagento opened this issue Sep 14, 2015 · 3 comments

Comments

@comunidademagento
Copy link

See image and error.

captura de tela de 2015-09-14 20 28 25

captura de tela de 2015-09-14 20 29 35

exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't create directory /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/var/generation/Magento/Framework/App/Resource/.' in /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/Code/Generator.php:106 Stack trace: #0 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\Framewo...') #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\Framewo...') #2 [internal function]: spl_autoload_call('Magento\Framewo...') #3 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\Framewo...') #4 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Framewo...') #5 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Framewo...') #6 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #7 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #8 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'resource', 'Magento\Framewo...') #9 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Framewo...', Array, Array) #10 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #11 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #12 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'frontendFactory', 'Magento\Framewo...') #13 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Framewo...', Array, Array) #14 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #15 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #16 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'frontendPool', 'Magento\Framewo...') #17 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Framewo...', Array, Array) #18 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #19 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #20 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'cacheFrontendPo...', 'Magento\Framewo...') #21 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Framewo...', Array, Array) #22 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #23 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #24 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'cache', 'Magento\Framewo...') #25 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Framewo...', Array, Array) #26 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #27 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/App/ObjectManager/Environment/Developer.php(67): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #28 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/App/ObjectManagerFactory.php(181): Magento\Framework\App\ObjectManager\Environment\Developer->configureObjectManager(Object(Magento\Framework\Interception\ObjectManager\Config\Developer), Array) #29 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(384): Magento\Framework\App\ObjectManagerFactory->create(Array) #30 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(231): Magento\Framework\App\Bootstrap->initObjectManager() #31 /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/index.php(38): Magento\Framework\App\Bootstrap->createApplication('Magento\Framewo...') #32 {main}

@maksek
Copy link
Contributor

maksek commented Sep 14, 2015

Seems like exception is very clear - 'Can't create directory /home/magento2ubuntu1404/dados/public_html/magento2-1.0.0-beta-dev01/magento2/var/generation/

make var dir writable for webserver.

@dannymichel
Copy link

I've -R 777 var but am still getting the error

@ghost
Copy link

ghost commented Jun 2, 2016

Giving full permission (777) to var and pub directory after upgrade solved this issue for me.

Run the command using .

php bin/magento setup:upgrade

chmod -R 777 var pub

clear cache.

rm -rf var/cache/* var/generation/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants