Magento – Magento 2 – bin/magento Commands not working in Cpanel Terminal

command linefile-permissionsmagento2

I have an issue while try to run commands bin/magento in terminal. Commands not working. No command run after bin directory. You can see the below screenshot about the error.

Basically yesterday I installed Mailchimp extension using SSH Putty (login as root user). Now I can't run commands in terminal.

enter image description here

Need help.

Best Answer

You need to run magento2 ssh command from root of the magento. Goto directory public_html (not goto bin directory) and run

php -f bin/magento cache:flush

To reset all file and folder permission

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

Change permission of these three directory & files to 755 or 777.

chmod -R 777 var pub generated
Related Topic