0

I use magento 2 blank and when I trying to apply a new theme I see this message

Exception #0 (Magento\Framework\Exception\FileSystemException): Directory "D:/wamp64/www/magento-2/pub/static/_requirejs/frontend/" cannot be created Warning!mkdir(): Invalid argument

1

Giving full control (read/write/execute) to var and pub directory solved this issue for me.

sudo chmod -R 777 var pub

Or, you may also try running the command using sudo.

sudo php bin/magento setup:upgrade

Also, try clearing cache.

sudo rm -rf var/cache/* var/generation/*
  • Thanks but I can't use this command in windows sudo chmod -R 777 var pub – Kareem Sultan Jul 14 '17 at 9:18
  • You can install "Cygwin" and then use chmod -R 777 var – Nikunj Vadariya Jul 14 '17 at 11:37
  • 1
    DON'T change directory permissions to 777. If you have to do this, your server is wrongly configured. – simonthesorcerer Oct 13 '18 at 20:06
  • giving permission 777 is not a good solution – amit_game Nov 1 '19 at 5:04
0

This is permission issue. Kindly provide the necessary permissions to pub/ and var/ directories.

For more info, http://devdocs.magento.com/guides/v2.1/config-guide/prod/prod_file-sys-perms.html

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.