0

my website https://roofmegastore.co.uk/ is coming up with this error.

    1 exception(s):
Exception #0 (Magento\Framework\Exception\FileSystemException): Directory "/var/www/html/magento/pub/static/frontend/Smartwave/porto/en_GB" cannot be created Warning!mkdir(): Permission denied

Exception #0 (Magento\Framework\Exception\FileSystemException): Directory "/var/www/html/magento/pub/static/frontend/Smartwave/porto/en_GB" cannot be created Warning!mkdir(): Permission denied
#0 /var/www/html/magento/vendor/magento/framework/Filesystem/Driver/File.php(199): Magento\Framework\Filesystem\Driver\File->mkdirRecursive('/var/www/html/m...', 511)
#1 /var/www/html/magento/vendor/magento/framework/Filesystem/Directory/Write.php(89): Magento\Framework\Filesystem\Driver\File->createDirectory('/var/www/html/m...', 511)
#2 /var/www/html/magento/vendor/magento/framework/Filesystem/Directory/Write.php(247): Magento\Framework\Filesystem\Directory\Write->create('frontend/Smartw...')
#3 /var/www/html/magento/vendor/magento/framework/Filesystem/Directory/Write.php(264): Magento\Framework\Filesystem\Directory\Write->openFile('frontend/Smartw...', 'w+')
#4 /var/www/html/magento/vendor/magento/module-require-js/Model/FileManager.php(135): Magento\Framework\Filesystem\Directory\Write->writeFile('frontend/Smartw...', '(function(requi...')
#5 /var/www/html/magento/vendor/magento/module-require-js/Model/FileManager.php(63): Magento\RequireJs\Model\FileManager->ensureSourceFile('frontend/Smartw...')
#6 /var/www/html/magento/vendor/magento/module-require-js/Block/Html/Head/Config.php(126): Magento\RequireJs\Model\FileManager->createRequireJsConfigAsset()
#7 /var/www/html/magento/vendor/magento/framework/View/Element/AbstractBlock.php(272): Magento\RequireJs\Block\Html\Head\Config->_prepareLayout()
#8 /var/www/html/magento/vendor/magento/framework/View/Layout/Generator/Block.php(150): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor))
#9 /var/www/html/magento/vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#10 /var/www/html/magento/vendor/magento/framework/View/Layout.php(343): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#11 /var/www/html/magento/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()
#12 /var/www/html/magento/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#13 /var/www/html/magento/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#14 /var/www/html/magento/vendor/magento/framework/View/Layout.php(253): Magento\Framework\View\Layout\Builder->build()
#15 /var/www/html/magento/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#16 /var/www/html/magento/vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout->getBlock('page_content_he...')
#17 /var/www/html/magento/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'porto_home_21')
#18 /var/www/html/magento/vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Index\Index->execute()
#19 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
#21 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#22 /var/www/html/magento/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(26): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#23 /var/www/html/magento/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#26 /var/www/html/magento/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /var/www/html/magento/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#29 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#30 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#31 /var/www/html/magento/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#32 /var/www/html/magento/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#33 /var/www/html/magento/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#34 /var/www/html/magento/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#35 {main}

I've given it access and tried to re-upgrade it but nothing seems to be working for, any suggestions?

0

The issue is permission is not set correctly. If you face this type of error then login from SSH and from Magento root directiry run below command.

sudo chmod -R 777 var/ pub/ generated/
0

make sure to assign the proper permissions to your user. As you can see on the error line it is an permissions problem:

..porto/en_GB" cannot be created Warning!mkdir(): Permission denied

As soon as you assigned the right permissions to create directories this should be solved.

  • How would I go about doing that? I use Ubuntu 16.04 – Mm2000 Nov 22 '18 at 14:29
0

This is a permission issue.

Run below command step by step in root directory:

sudo chmod -R 777 var/ pub/

sudo php bin/magento setup:upgrade

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

sudo php bin/magento cache:flush

Let me know if any issue.

Hope it help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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