Ad
.composer/config File Permission Denied Using Laravel
I have a laravel project on an ubuntu virtualbox.
I used to run composer update
and all worked fine. I don't know of any changes that could have affected this but now when I run composer update
I get
file_get_contents(/home/user/.composer/config.json): failed to open stream:
Permission denied
Does anyone know why? When I run sudo composer update
, it works.
Ad
Answer
Your permissions got changed somehow (perhaps not related with running composer
). Setting the owner of that file as your user should fix the issue:
sudo chown user /home/user/.composer/config.json
The above assumes that the username is user
from the home path. As a side note, it works when running it as a super user using sudo
because there's no permissions restrictions in that case.
Ad
source: stackoverflow.com
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
Ad