Skip to content

Instantly share code, notes, and snippets.

@ibrahimtuzlak0295
Last active October 13, 2019 20:14
Show Gist options
  • Save ibrahimtuzlak0295/2afe174cb762dd0746743565e4c130e5 to your computer and use it in GitHub Desktop.
Save ibrahimtuzlak0295/2afe174cb762dd0746743565e4c130e5 to your computer and use it in GitHub Desktop.
Use `composer global require` without `sudo` AND without permission errors

Use composer global require without sudo AND without permission errors

Composer is not supposed to be ran as sudo / root, but at the same using the global (or -g) argument might give us permission errors. To fix this, we need to change ownership of the ~/.composer directory to the current user:

$ sudo chown -R $USER:$USER ~/.composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment