magento2: The deployer tool does not handle symlinks correctly, fails silently.

Preconditions

  1. 2.1.7
  2. php7.0

Steps to reproduce

  1. Clone an existing site, having previously been installed and committed to vcs, but without the vendored dependencies.
  2. rm -rf media, and create a symlink that points to /tmp/thisdoesnotexist
  3. Try and install the application

Expected result

  1. The application install fails critically

Actual result

  1. The application install appears to succeed, but the files boostrap.php etc. are missing.

See the following stack overflow post for further details. https://magento.stackexchange.com/questions/177924/magenta-2-1-5-composer-install-fails-to-generate-all-files/184666#184666

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

I’ve been able to reproduce, but with a permission problem. The composer install ends fine, but I think it should fail. as suggested by @hostep can you reopen it ?

Steps to reproduce:

$ composer create-project --no-install --repository-url=https://repo.magento.com/ magento/project-community-edition /tmp/m2test/
$ cd /tmp/m2test/
$ mkdir /tmp/media && chmod 000 /tmp/media && ls -ld /tmp/media  #make the permission problem
d--------- 6 x2i www-data 4096 Feb 20 15:26 /tmp/media
$ mkdir pub
$ ln -s /tmp/media pub/media #make a simplink to the failing directory
$ composer install -vvv
...
copy(/tmp/m2test/./pub/media/.htaccess): failed to open stream: Permission denied
...

Then, If you look on what is deployed: bin/magento is there, vendor too, but all files after ‘pub/media/.htaccess’, declared in ‘vendor/magento/magento2-base/composer.json’ , are missing (vendor/.htaccess for example).

Thank in advance, Marc

Edit: I have removed my initial and unfair reply. I’m sorry for it’s venom.

To assist me in helping you debug this, can you please articulate the steps you took to correct the issue? In particular, I have noted the problem in some detail here:

https://magento.stackexchange.com/questions/177924/magento-2-1-5-composer-install-fails-to-generate-all-files/184666#184666?

Can you reiterate the steps that you followed in line with the above article?