Being a "root" user I install my composer like curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin -- --filename=composer
which by default creates vendor-dir, cache etc inside /root/.composer. I want to install some global packages as root and let other users to use those packages. E.g
> whoami
root
> composer global require hirak/prestissimo (It makes packages download in parallel)
> su www-data
> cd /var/www/drupal
> composer install
Expected behaviour: It should download packages in parallel as install hirak/prestissimo globally but it does not. Because when I had installed that package it was inside /root/.composer/vendor and after switching to www-data it is not able to read/write /root/.composer/vendor