[wp-trac] [WordPress Trac] #48949: ftp_rmdir(): Remove directory operation failed.

WordPress Trac noreply at wordpress.org
Thu Dec 12 13:02:21 UTC 2019


#48949: ftp_rmdir(): Remove directory operation failed.
-----------------------------+-----------------------------
 Reporter:  didax            |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  5.3
 Severity:  normal           |   Keywords:  needs-patch
  Focuses:                   |
-----------------------------+-----------------------------
 Whenever you need to update a plugin, this error is triggered:
 {{{
 Warning: ftp_rmdir(): Remove directory operation failed. in /wp-
 admin/includes/class-wp-filesystem-ftpext.php on line 381
 }}}
 when
 {{{
 define('FS_METHOD', 'ftpext');
 }}}
 is defined inside ''wp_config.php''.

 In this situation, the error seems to be caused by the deleting attemp of
 ''.maintenance'' file.
 In this scenario the '''delete''' method of the ''class-wp-filesystem-
 ftpext.php'' is called with '''$recursive = false'''.
 So, when ''.maintenance'' file not exists the condition on line 377 of
 class-wp-filesystem-ftpext.php is not executed and the next condition on
 line 380 is reached.
 '''ftp_rmdir''' returns (rightly) a fault.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48949>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list