1

When I run any M2 command line scripts I get the follow error message:

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

My user is a part of the group with admin rights and the file owner.

May I ask where else to check?

  • in your command line run chmod g+s var/generation which should give you the access you need – Dava Gordon Sep 13 '17 at 21:18
0

Yeah, it's a file permission error.
In case if you are ubuntu user, then you can run the following commands:

cd /path/to/magento2/
sudo chmod -R 777 var/
sudo chown -R www-data:www-data var/
  • The user "www-data" does not exist. Is that a separate issue? – Matthew McLennan Apr 12 '17 at 14:27

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.