Permissions when trying to install Symfony application with composer

Please refrain from commenting on your assumption if you have not read my list of troubleshooting steps. I update this list when offers come.

In my Windows 7 collaborative environment, when trying to install one of our Symfony 2.5-based applications. *, we get the following problem with unlink :

Composer Install Error

We tried the following:

  • Running composer self-update
  • Running composer update instead of composer install (which led to the same error below)
  • Running git bash in admin mode
  • Running composer install from a DOS admin shell instead of git bash
  • Cloning our repository in several places, including directly on the user's desktop
  • Change file permissions for full control and ownership of the current user (recursively)
  • Change file permissions for full control and ownership of "Everything" (recursively)
  • Change file permissions for full control and ownership of SYSTEM (recursively)
  • Starting a new project from scratch using composer create-project symfony/framework-standard-edition test/ "2.5.*" And composer create-project symfony/framework-standard-edition path/ "2.3.*" (In case there is a problem associated with version)
  • Trying on another Windows 7 machine (with the same result)
  • Delete a vendor folder and clear the composer's cache
  • Disabling the indexer (Windows Search)

Any ideas on what's going on? Is this a composer mistake or one of the pleasures of working with Windows? All of the above works fine on my OSX machine.

Another debugging note ... when I try to manually disconnect the connection with php -r "unlink('...');" she does not delete this file without problems

+6
source share
1 answer

I found a problem. Office Trend Antivirus called Trend Micro ran a live scan of all newly created files. Since the antivirus program accessed the file, the composer at the same time tried to unlink files; the composer would fail. Adding a repository regarding the anti-virus white list (as well as the Windows indexer for security) completely fixed the problem.

I created a problem in GitHub for the composer team to work so that this exception could be handled in some way (for example, the sleep function when unlink fails)

Thanks for the troubleshooting help, everyone.

EDIT: since this edit, the fix has been recorded, so if you run into this problem, just run composer self-update to make sure Composer has the latest fix for this.

+2
source

Source: https://habr.com/ru/post/971113/


All Articles