0

Please find below attached screenshot

Magento 2.1.6

0

The problem is caused due to the permission issue on the static files.

To fix this issue;

1) Open app/etc/env.php and set 'MAGE_MODE' => 'developer',.

2) Go to file path pub/static/

3) Check whether .htaccess file is available (Press Ctrl+H to view the hidden file).

4) If not available, based on the Magento version, get .htaccess file in the file path pub/static/ and copy into your file structure.

5) Finally, clear your browser and Magento cache and check it. (optionally you can run the below command to clear Magento Cache)

php bin/magento cache:flush

P.S: If you still encounter the same issue after trying above steps, copy files under pub/static to some other location in your PC and delete all files under pub/static. Clean Magento/Browser cache again and try back.

  • Try it but still get same error – Manoj Patel Jan 8 '19 at 10:52
0

Go to your magento 2 installation directory through terminal and run these commands.

icacls "C:\PathToMagentoInstallationRoot\" /grant Users:F

icacls "C:\PathToMagentoInstallationRoot\pub\" /grant Users:F

icacls "C:\PathToMagentoInstallationRoot\generated\" /grant Users:F

icacls "C:\PathToMagentoInstallationRoot\var\*" /grant Users:F

php bin/magento deploy:mode:set developer

php bin/magento cache:clean

php bin/magento cache:flush

del C:\PathToMagentoInstallationRoot\generated\*

php bin/magento setup:di:compile
  • I have installing on windows machine. Could these commands run on windows also? – Manoj Patel Jan 7 '19 at 5:47
  • I have updated my answer according to windows. Please try this. – Muhammad Mannan Masood Jan 7 '19 at 14:23
  • Starting 2 commands are working but i don't have generated folder so icacls "C:\PathToMagentoInstallationRoot\generated\" /grant Users:F not working – Manoj Patel Jan 8 '19 at 10:52
  • Okay, then manually create this folder in you magento directory and the run all these commands. and skip the second last command. – Muhammad Mannan Masood Jan 8 '19 at 13:58
  • did it helped.? – Muhammad Mannan Masood Jan 9 '19 at 14:38

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.