1
sudo rm -rf pub/static/*

sudo php bin/magento setup:upgrade

I have set 777 permission to pub but still getting

[Exception] :

Missing write permissions to the following directories: '/var/www/magento2/pub/static'

Suggest some solution.

  • Which command use for set 777 permissions ? – Payal Patel Sep 26 '16 at 4:55
  • @Payal Patel - chmod -R 777 pub the permission is set but then also it gives the error – zest Sep 26 '16 at 4:59
  • Use this command @Zest :- sudo chmod 777 -R pub – Payal Patel Sep 26 '16 at 5:00
  • yes I used this command and it is setting permission but still getting error – zest Sep 26 '16 at 5:01
  • Unless you really need 2.0.7 (testing an upgrade maybe?) you should just install 2.1.1/latest at this point. – MartyS Magemojo Support Sep 26 '16 at 9:47
0

Please check this link.

I hope this link helpful for your issue.

Missing write permissions in directory pub/static when run bin/magento setup:upgrade

You can check also below link.

Magento2 Missing write permissions to the following directories: 'site/public_html/pub/static'

  • Thanks I followed the steps but still getting error – zest Sep 26 '16 at 5:10
  • Check my update answer and try to follow link @zest. – Payal Patel Sep 26 '16 at 5:15
0

I think, First you need create Static Content,

 bin/magento setup:static-content:deploy

Then Run,

  chmod -R 777 /var/www.html/
  bin/magento setup:upgrade 

This way worked for me,

0
 Type sudo chmod 777 -R var pub command in terminal
 then php bin/magento setup:upgrade

hope it will works

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.