[wp-trac] [WordPress Trac] #53043: Upgrade to WP 5.7.1 fails if wp-config-sample.php not in home directory

WordPress Trac noreply at wordpress.org
Fri Apr 16 01:44:37 UTC 2021


#53043: Upgrade to WP 5.7.1 fails if wp-config-sample.php not in home directory
-----------------------------+------------------------------
 Reporter:  dlanced          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:
 Severity:  minor            |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by dd32):

 Hi @dlanced,

 This indicates that one these things happened differently than before:
  - The directory wasn't writable by WordPress
  - The server was experiencing a higher IO load causing failures
  - PHP thought it could write to the file, but failed to when actually
 doing it

 The WordPress upgrade routines expect that full WordPress package is
 available - and yes, that includes the sample config file (although I
 totally understand why that's unexpected). As far as I know, this hasn't
 changed at all from previous releases.

 (This next part is included for context for others working on the upgrade
 routines)

 ~100 (of 573 with this error code) sites that attempted to update to 5.7.1
 ran into this error:
 {{{
 error_code: copy_failed__copy_dir_retry
 error_data: wp-config-sample.php
 }}}

 While ~25 ran into this one:
 {{{
 error_code: files_not_writable
 error_data: wp-config-sample.php
 }}}
 (out of ~10k with this error code - Looks like the majority of those ran
 into multiple files being unwritable)

 It looks like you're probably one of the 100 based on the error message
 shared, that also means it's likely that WordPress has tried twice to
 write the file, and failed on both occasions.

 Ignoring that WordPress has failed to update the file doesn't seem like a
 bad idea to me, BUT, it means that the file would also have to be excluded
 from checksum checking (although
 [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes
 /update-core.php?marks=1074#L1054 we already exclude .html/.txt files from
 that]). I'm not sure I'd suggest ignoring a mismatching `.php` file in
 that, since it'd be a great place for an exploit to hide, but the file not
 existing is a minor issue rather than a show stopper.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53043#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list