0

command line user does not have read and write permissions on generated directory. Please address this issue before using Magento command line

when I was trying to run php bin/magento indexer:reindex.

And I found I get the exactly same error when I tried to run the php bin/magento lines, I checked the post Error after magento upgrade, and have already changed the permission of generated folder, and then give bin/magento file to 744 (executable), and I used ls -l, the ownership of the folder is below to my account. I am using Magento 2.2, so there is no di folder under var folder. So why does this error happen?

Thanks for any advises.

enter image description here

enter image description here

  • Please check folder and files owner/group – Jugal Kishor Aug 1 '18 at 8:33
0

More likely than issue with with bin/magento (even though actually there is no executable bit on any level of access) there is an issue with generated folder. As you can read in documentation for v2.2 compiled files changed theirs paths to /generated/*

I assume that you have properly set privileges bits for previous version but maybe you missed setgid/uid bits and therefore user executing php script do not have access to this file (all is a file in unix, also dirs).

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.