drupal-composer/drupal-project

web/sites/default/default.services.yml): failed to open stream: Permission denied when using composer require

therobyouknow opened this issue · 3 comments

permissions seem ok, even moved the file so it could write over it, why is it fixated on this file, please?

What exactly have you done before running into this error? Which commands have you executed? On what OS? With what version of Composer? How does your composer.json look like?

Thank you for replying, @leymannx

Solved it: The parent/enclosing directory folder - default had no write permissions.

Not sure why, but applying write permissions to it solved the problem.

I do recall having the same issue a little while ago, and it took a bit more than changing the permissions of the parent folder, back then I had to move the file - I renamed it with a _ ending in the name so that a new version of the file with the original name.

Thanks again for replying. I hope that the issue helps others who encounter it.

Solved it: The parent/enclosing directory folder - default had no write permissions.

Hello, in fact, I had to give permissions each folder (default, files) and each files. Anyway, thanks for answer.