abhinand
abhinand

Reputation: 574

Symfony cannot install new bundles because of composer permission issue

While try to install new bundles into my project composer issue happens which is regarding permission, issue follows

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile handling the symfony-scripts event terminated with an exception

Installation failed, reverting ./composer.json to its original content.


[Symfony\Component\Filesystem\Exception\IOException]                                                                                                                 
Failed to copy "/var/www/html/myProject/vendor/sensio/distribution-bundle/Composer/../Resources/skeleton/app/check.php" to "bin/symfony_requirements" because target file could not be opened for writing.                                                                                                                                    

Thank you...

Upvotes: 4

Views: 2288

Answers (2)

ToTo
ToTo

Reputation: 99

this might help you:

sudo chmod -R 777 bin/symfony_requirements

check if other directory and files need permission, for example in my case:

sudo chown -R $USER web/

was also needed.

furthermore if you had problem with cache and logs you may find following useful:

 rm -rf var/logs
 rm -rf var/cache
 rm -rf vendor

and then using composer install

Upvotes: 2

Pavel Parshin
Pavel Parshin

Reputation: 517

You have wrong permissions on file bin/symfony_requirements. Fix it and all will work like a charm

Upvotes: 2

Related Questions