0

Basically, I'm not the only one who has encountered this: I run php bin/magento module:enable, page stops loading after that (see the accepted answer by TS)

Does anybody know how/why this happened and how can I fix this? I can always re-set the whole permission again after every enable/disable module but that's annoying.

3
  • Hello @Farid, do you still have issue? – Purushotam Sangroula Jan 16 '18 at 13:18
  • Nope. Didn't followed exactly what you replied, but it helped me a lot on understanding permission with Linux. Now it's working fine. Thanks :) – Farid Jan 18 '18 at 6:37
  • You are welcome. – Purushotam Sangroula Jan 18 '18 at 6:39
0

I'm taking reference of apache server in which www-data will be the server group. Follow the same for other servers as well. This is related to ownership issue. Since you are running php bin/magento enable:module as your pc user the files ownership must have changed to your-user-name:your-user-name instead of www-data:www-data or your-user-name:www-data.

To solve this issue you must set group www-data as group and you can either place yourself as owner or give complete ownership to www-data of magento files. In the case you set yourself as an owner you must add yourself to the server's group i.e. www-data.

Next you need to run find var -type d -exec chmod g+s {} \;

What this does is that all new files and subdirectories created within the current directory inherit the group ID of the directory, rather than the primary group ID of the user who created the file. This will also be passed on to new subdirectories created in the current directory.

I hope this works for you.

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.