In the core 9.4.7 update, the
default.services.yml file was updated. However, if your permissions are set correctly on the
/default directory and the
default.services.yml file, then composer update will fail with the "could not delete" permissions warning.
You can solve this as follows on most versions of linux and macOS.
default.services.yml. (You may need to use
sudo rm default.services.yml).
Next, try running
composer install (since you have already run the update, running
install will cause the scaffolding to be reset). If the file is created properly, check the permissions against this answer and if they are ok, you are done.
If the file cannot be created, carefully change the permissions of the
default directory (but not any child/subdirectories) to
chmod default 777), run
composer install again to create the file, and then change the permissions for the
default directory back to 755 (
chmod default 755).
Why does this happen?
Drupal needs file permissions for services files to be set securely so that they cannot be changed by just anyone. Unfortunately, this makes updating these files a bit of a pain because the update requires manual intervention (since the files can't be easily overwritten automatically, unlike most Drupal files in updates).