1

Hello i just created new module i tryed to install but i got this after i deleted module but still this error....

Fatal error: Uncaught RuntimeException: Can't create directory /var/www/html/generated/code/Magento/Directory/Helper/Data/. in [Magento\Directory\Helper\Data\Proxy] in /var/www/html/vendor/magento/framework/Code/Generator.php:115 Stack trace: #0 /var/www/html/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\Directo...') #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\Directo...') #2 [internal function]: spl_autoload_call('Magento\Directo...') #3 /var/www/html/vendor/magento/framework/ObjectManager/Relations/Runtime.php(38): class_exists('Magento\Directo...') #4 /var/www/html/vendor/magento/framework/Interception/Config/Config.php(166): Magento\Framework\ObjectManager\Relations\Runtime->has('Magento\Directo...') #5 /var/www/html/vendor/magento/framework/Interception/Config/Config.php(160): Magento\Framework\Interception\Config\Config->_inheritInterception('Magento\Directo...') #6 /var/www/html/vendor/magento/framewo in /var/www/html/vendor/magento/framework/Code/Generator.php on line 115

1
  • Its a permission issue. Commented Aug 29, 2018 at 14:52

2 Answers 2

0

Try to run following code from your root magento dir from ssh

sudo chmod -R 777 generated/
5
  • well now i cant do reindex prntscr.com/kom9ii Commented Aug 30, 2018 at 11:07
  • please check by adding php before bin/magento Commented Aug 30, 2018 at 12:04
  • prntscr.com/kon6go Commented Aug 30, 2018 at 12:14
  • now cache folder permission issue. please run sudo chmod -R 777 var/cache Commented Aug 30, 2018 at 12:51
  • Anyone help me how to give permission in wamp windows? Commented Apr 5, 2019 at 10:14
0

Directory permission error, can not write to generated directory

chmod 770 /var/www/html/generated

Reference https://devdocs.magento.com/guides/v2.2/install-gde/prereq/file-sys-perms-over.html

1
  • well i set in html folder 777 and it works.. but i cant do reindex via cli.... yesterday i got that error prnt.sc/koaqik and now i got this prntscr.com/koluf6 Commented Aug 30, 2018 at 10:59

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.