0

The upgrade from 9.5.11 to 10.1.7 fails with the error: Upgrade of drupal/core failed; Could not delete core I followed the steps in https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/how-to-upgrade-from-drupal-9-to-drupal-10 The step composer update --dry-run gives no errors. What should I do? (btw: a few days ago I tested the proces with a demo-version of the site and everything worked fine; although the upgrade then was to 10.1.6)

[u134858p129517@web0137 public_html]$ ls -la
totaal 30480
dr-xr-xr-x 11 u134858p129517 u134858p129517     4096 27 apr  2022 .
drwx--x--x  7 u134858p129517 u134858p129517     4096 19 feb  2022 ..
-rw-r--r--  1 u134858p129517 u134858p129517      312 12 dec 10:06 autoload.php
-rw-r--r--  1 u134858p129517 u134858p129517     4085 12 dec 10:17 composer.json
-rw-r--r--  1 u134858p129517 u134858p129517   219854 12 dec 10:26 composer.lock
drwxrwxrwx  2 u134858p129517 u134858p129517     4096 12 dec 10:27 core
-rw-r--r--  1 u134858p129517 u134858p129517     1025 20 sep 13:42 .csslintrc

. . . .

[u134858p129517@web0137 public_html]$ ls -la core
totaal 8
drwxrwxrwx  2 u134858p129517 u134858p129517 4096 12 dec 10:27 .
dr-xr-xr-x 11 u134858p129517 u134858p129517 4096 27 apr  2022 ..
[u134858p129517@web0137 public_html]$ 
2
  • 1
    Make sure the user executing composer has write permissions over the web root
    – Clive
    Dec 8, 2023 at 11:10
  • The directory is empty, which is just...interesting. But the parent directory is unwritable and that is why Composer cannot remove the directory.
    – mona lisa
    Dec 14, 2023 at 15:13

1 Answer 1

2

This happens because the core directory or its parent directory is unwritable by the shell user. Make the directory and its parent directory writable by the shell user to proceed.

9
  • Thanks for your advice. I checked the permissions on the core directory and they were OK. As the website had to be brought life again, I restored a backup (Drupal 9.5.11) and repeated the proces on a 100% copy of the website. This time without any errors. I will run the upgrade proces on the production site in a few days (need to plan this first). Hopefully this time without errors.
    – EfCee
    Dec 10, 2023 at 15:39
  • The permissions were not ok. There is no other way this could have happened.
    – mona lisa
    Dec 10, 2023 at 16:09
  • Thanks again for your support. And I don't mean to be stubborn, but running the process another time gives the same error. These are the permissions at the start of the update process: drwxrwxrwx 2 u134858p129517 u134858p129517 4096 12 dec 10:27 core ... I sure hope you can tell me what is wrong.
    – EfCee
    Dec 12, 2023 at 9:50
  • Add the output of ls -la core to the Question.
    – mona lisa
    Dec 12, 2023 at 11:46
  • Btw, the map core is empty
    – EfCee
    Dec 13, 2023 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.