laravel / homestead

MIT License
3.85k stars 1.45k forks source link

Composer root permision error during "vagrant up" #811

Closed dabagab closed 6 years ago

dabagab commented 6 years ago

Composer error: You are running composer as "root", while "/home/vagrant/.composer" is owned by "vagrant" You are already using composer version 1.6.3 (stable channel).

Versions

A lot of issues can be resolved by simply updating vagrant, provider or homestead.

Note: Virtualbox users, please upgrade to ~5.2. You will show as up-to-date from the ~5.0 version when you About -> Check for Updates. You'll need to download a newer version of Virtualbox.

Host operating system

Fedora 27

Homestead.yaml

ip: "192.168.10.10"
memory: 1024
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Projects/yyy
      to: /home/vagrant/yyy

sites:
    - map: symfony-app.test
      to: /home/vagrant/yyy/public
      type: symfony4

databases:
    - homestead

Vagrant destroy & up output

VagrantUP Proble is in the line: 135-136

Expected behavior

composer command could run automatically

Actual behavior

I have to ssh login to the Homestead and then manually running the composer command.

Steps to reproduce

  1. Git clone "this repository"
  2. Running "vagrant up"

References

I did not find. Maybe this stackoverflow entry.

svpernova09 commented 6 years ago

https://github.com/laravel/homestead/issues/806#issuecomment-363502769

svpernova09 commented 6 years ago

Thanks for reporting the issue, see the comment link above ^