0

When running:

root@ubuntu:/var/www/Magento2# bin/magento setup:static-content:deploy

I got

-bash: bin/magento: Permission denied

please note that I'm running the command using root user

  • What is the output of ls -l bin/magento? – Renon Stewart Feb 23 '16 at 12:14
  • Please provide execute permission to for it even for ROOT user. chmod -x bin/magento – Praful Rajput Feb 23 '16 at 12:21
  • use like php bin/magento setup:static-content:deploy The php need to be added before bin/magento – Ashish Raj Jan 2 '18 at 6:45
1

You can also try php bin/magento setup:static-content:deploy

0

Use word php before the command

php bin/magento setup:static-content:deploy

Refer : Devdocs : static contents

0

As already mentioned in the comments:

Check the permission of the file like so:

ls -lah bin/magento

You will see that the execute permissions are missing. Therefore add the execute permissions like so:

chmod +x bin/magento

If you don't want to allow execution for that script, you can run the script with your local php installation like so:

php bin/magento ...

Nevertheless you should not run any command as root.

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.