SSH Command Line Error on fresh install of Magento 2.2.5 on Bitnami

by jacknely   Last Updated July 23, 2018 20:09 PM

I have tried numerous installations of magento on Bitnami and I keep getting the below error when trying to upgrade using 'sudo php /opt/bitnami/apps/magento/htdocs/bin/magento-cli setup:upgrade':

Check the user before running the command if [ id | sed -e s/uid=//g -e s/\(.*//g -ne 0 ]; then echo "Please run this script using admin privileges (as root user or using sudo). This way, it will use the proper user to run the Magento's command" >> /dev/stderr exit 1 fi Run the Magento's commands using the web servers' user and group su daemon -s /bin/bash -c "/opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento $*"

I have tried changing permissions and group users on all files but it doesnt seem to make any difference. Please advise. Thank you!



Answers 1


You should execute the magento-cli script directly, not via the PHP interpreter:

cd /opt/bitnami/apps/magento/htdocs
sudo bin/magento-cli setup:upgrade

Also, make sure you are logging in to the box as the "bitnami" user. If you're on EC2, it will by default suggest the "ubuntu" user. While logging in does work, it appears to cause some issues when the magento-cli script attempts to su daemon.

nitwit
nitwit
August 10, 2018 14:22 PM

Related Questions


Magento 2 - setup:install & setup:upgrade

Updated August 25, 2017 16:09 PM

Magento2 Upgrade Error

Updated September 28, 2017 06:09 AM

How can i run random URL without open a new window

Updated December 12, 2017 10:09 AM

Magento command line

Updated August 22, 2015 18:04 PM

Override class in setup:upgrade command in magento2

Updated December 05, 2017 14:09 PM