When the script is not running from the directory it needs to be running from, it should detect that, and say it clearly to the user, or better, change to the directory it needs to run from, and continue.
When the script has no permissions to read (or write, etc…) files, it should detect that, and say it clearly to the user, in an error message, in plain language.
Users shouldn’t have to be PHP developers, or expert command line troubleshooters, to install, upgrade, migrate, or run the app.
All of the necessary expertise should be part of the scripts and the app, and error conditions should be communicated to the user thru clear accurate error messages that also explain how to fix the problem, or just automatically fix the problem, and continue.
Thanks for all ideas. Here is the latest update. We advanced a little and we got the following error:
system@mrmoose:/var/www/crm1.eco2.ca$ ./bin/console suitecrm:app:upgrade
PHP Warning: require(/var/www/crm1.eco2.ca/vendor/composer/…/…/public/legacy/deprecated.php): Failed to open stream: No such file or directory in /var/www/crm1.eco2.ca/vendor/composer/autoload_real.php on line 41
PHP Fatal error: Uncaught Error: Failed opening required ‘/var/www/crm1.eco2.ca/vendor/composer/…/…/public/legacy/deprecated.php’ (include_path=‘.:/usr/share/php’) in /var/www/crm1.eco2.ca/vendor/composer/autoload_real.php:41
Stack trace: #0 /var/www/crm1.eco2.ca/vendor/composer/autoload_real.php(45): {closure}() #1 /var/www/crm1.eco2.ca/vendor/autoload.php(25): ComposerAutoloaderInit0013c270369ae4573daa9e6c29448bc5::getLoader() #2 /var/www/crm1.eco2.ca/bin/console(15): require(‘…’) #3 {main}
thrown in /var/www/crm1.eco2.ca/vendor/composer/autoload_real.php on line 41