Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Magento 2 Permissions Exception During bin/magento setup: upgrade

After updating a module & running bin/magento setup: upgrade, if you are getting exception – “Missing write permissions to the following directories: ‘/var/www/html/magento2/pub/static’, you don’t need to worry anymore. Due to an older installation where some symlinks & old files are no longer existing, when checkInstallationFilePermissions confirms the permission recursively, it finds missing symlink & returns false on the verification step. This blog post is going to explore the steps to handle this exception & how to debug it.

1) setup/src/Magento/Setup/Model/FilePermissions.php

2) Come to the line 143 in method checkRecursiveDirectories

3) Include the lines var_dump($subDirectory);var_dump($subDirectory->isWritable());

4) Run again - bin/magento setup: upgrade

After performing above steps, if you are still not able to debug the issue,

5) You need to check for existing modules that no longer exist, but having files in pub/static folder. We recommend you delete such files.

After such steps, run php bin/magento setup: upgrade command, and also clear cache.



This post first appeared on Improving Employees’ Performance – Part Two, please read the originial post: here

Share the post

Magento 2 Permissions Exception During bin/magento setup: upgrade

×

Subscribe to Improving Employees’ Performance – Part Two

Get updates delivered right to your inbox!

Thank you for your subscription

×