cancel
Showing results for 
Search instead for 
Did you mean: 

bin/magento deleted when upgrading to Magento 2.2.0 using composer

bin/magento deleted when upgrading to Magento 2.2.0 using composer

I am tying to upgrade a Magento 2.1 site to Magento 2.2.0 but it seems to be dropping out during the process and the bin/magento file is removed but not replaced so nothing at all works after this.

I am using these commands:

cd /var/www/html
bin/magento maintenance:enable
composer require magento/product-community-edition 2.2 --no-update  
composer update

It seems to work nicely upgrading all the files but then it seems to stop (as if it has actually finished) but I get the following and the file bin/magento has completely gone.

I am definitely using the same user account to do the upgrade as was used to install Magento so I don’t think it’s a permissions problem.

 ....truncated lots of updates....
 - Removing theseer/fdomdocument (1.6.5)
 - Installing theseer/fdomdocument (1.6.6)
 Downloading: 100%         

 zendframework/zend-session suggests installing mongodb/mongodb (If you want to use the MongoDB session save handler) zendframework/zend-session suggests installing zendframework/zend-cache (Zend\Cache component) paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.) zendframework/zend-captcha suggests installing zendframework/zend-i18n-resources (Translations of captcha messages) zendframework/zend-captcha suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha component) ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter) ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator) ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator) ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).) ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.) ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
 Package fabpot/php-cs-fixer is abandoned, you should avoid using it. Use friendsofphp/php-cs-fixer instead.
 Writing lock file
 Generating autoload files
 File doesn't exist: bin/magento
 Check "chmod" section in composer.json of magento/magento2-base package.
16 REPLIES 16

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

Same here from 2.2.0 to 2.2.1 with web based Process extensions update process.

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

Hi,

 

How did you fix it? I have the same problem.

 

Thanks in advance.


Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

I just had this same issue going from 2.1.8 to 2.2.2. I can't believe this same issue has persisted going on 4 months now and they haven't even responded. Actually no, i can believe it.


Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

Hi,

I solved it, atleast worked for me.. I got a brainflash what i did at installation.
After fresh installation it sayes to secure etc map with special rights. I did and totally forgot this.

Tested different servers, whole **bleep** .. until i remember it.

Give the map its original rights and upgrade will work.. atleast for me.

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

Hello,

Had been having the same problem and figured it out to be a permissions problem.

My Magento system had 755 permissions on directories. 

I changed directories to 775 and files to 664 and this allowed it to write the new bin/magento and other files it needed to as part of the upgrade

Hope it helps

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

So what are the actual commands you ran to do this?

 

Thanks

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

Same problem from 2.2.5 to 2.2.6... any workaround? I have change file and folder permissions without any fix Smiley Sad

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

I've been experiencing composer update issues ever since 2.1.8. I always experience that the composer update process will delete all my .htaccess files, bin/magento files, and root files in the app folder (autoload.php, bootstrap.php, & functions.php).

 

Not sure what I'm doing wrong here. Happened again going from 2.2.6 to 2.3.0, and I have to hunt down what all files that are simply not there.

Re: bin/magento deleted when upgrading to Magento 2.2.0 using composer

Did you find a solution to this? I have tried changing file permissions etc but it doesn't help creating bin/magento