[wp-trac] [WordPress Trac] #63187: Wrong Inconsistent Permissions Check in Filesystems

WordPress Trac noreply at wordpress.org
Fri Mar 28 10:17:03 UTC 2025


#63187: Wrong Inconsistent Permissions Check in Filesystems
-------------------------------------------------+-------------------------
 Reporter:  SirLouen                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.9
Component:  Upgrade/Install                      |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-testing-info has-   |     Focuses:
  patch early needs-copy-review                  |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  dev-feedback has-testing-info has-patch early => dev-feedback
     has-testing-info has-patch early needs-copy-review


Comment:

 Replying to [comment:6 siliconforks]:
 > The `unpack_package()` method is supposed to delete everything in the
 `upgrade` directory:
 >
 > https://github.com/WordPress/wordpress-
 develop/blob/baab2b8f2273319817edede1b3360f212cf42241/src/wp-
 admin/includes/class-wp-upgrader.php#L367

 Great point, this is accurately why it has historically caused troubles.

 But if you read the error text:

 `The update cannot be installed because some files could not be copied.
 This is usually due to inconsistent file permissions`

 It's completely misdirecting. In fact, files can/could perfectly be
 copied. The exact problem is that there is an existence of this file
 `version-current.php` that was not deleted [https://github.com/WordPress
 /wordpress-develop/blob/baab2b8f2273319817edede1b3360f212cf42241/src/wp-
 admin/includes/class-wp-upgrader.php#L367 by this section]


 And, paradoxically, could not be a permissions issue (this is what I'm
 exactly researching now inside the `ftpext` Filesystem class).

 Maybe it's not that urgent after all given the fact, as you say, that
 there is a good preventive operation that should save all users from this
 error.

 But definitely the error is wrong, and the check is even more wrong.

 PS: Again, it's 100% innocuous, if you are having a delete issue, you are
 going to receive a couple other hundred errors. But this can become a
 stone in the way of debugging this, after breaking my head for why I could
 not copy the file, to discover that the file was perfectly copied but not
 deleted.

 Maybe the message should also be edited in case of real copy fail:

 `The update cannot be installed because $versions_file cannot be
 overwritten`

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


More information about the wp-trac mailing list