File doesn’t exist: bin/magento
I recently went round in circles trying to get Magento 2.2.x to upgrade to 2.3.x. Every time I upgraded Magento and ran the
composer update update command , I would see the following message in the Command Line Interface:
File doesn't exist: bin/magento
Check "chmod" section in composer.json of magento/magento2-base package.
So, when I tried to run
bin/magento setup:upgrade I could not.
After many hours/days of research and investigation, I narrowed the problem down to a Permissions issue. This didn’t make any sense as everything was set exactly how the Magento Documentation sets it out.
However, it turns out that the
app/etc/ Directory was set so that the “magento” user did not have “write” permissions, but the “www-data” did. Also know as a
I simply updated the permissions of the Directory to allow the “magento” user to have “write” Permissions (aka
775) and I was able to overcome this obstacle.
At this stage, rather than trying to salvage the “progress” I have already made, I rolled back the server to a previous snapshot and tried again. This time it went smoothly. I re-tested this 6 times and it worked every time.