WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#7940 closed enhancement (fixed)

passive FTP support for WP_Filesystem_FTPext

Reported by: mcs_trekkie Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.6.1
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

As mentioned in http://wordpress.org/support/topic/208746 the webhoster Servage seems to have problems connecting with active FTP protocoll to its own servers.
This might be firewall related so I attached a script to allow the class to activate passive FTP mode.
The patch has been made against the current stable 2.6.2 release.

Any feedback is welcome.

Attachments (1)

wordpress-passive-ftp.diff (2.5 KB) - added by mcs_trekkie 6 years ago.
patch to add passive FTP transfer mode in wp-filesystem-ftpext

Download all attachments as: .zip

Change History (6)

@mcs_trekkie6 years ago

patch to add passive FTP transfer mode in wp-filesystem-ftpext

comment:1 @DD326 years ago

Currently out of the 3 FTP Methods:

  • FTP Extension: Active FTP (Not Passive)
  • FTP Sockets:
    • FTP Socket Extension: Passive FTP
    • FTP PurePHP Class: Passive FTP

Do any hosts *not* work with passive when connecting from within their network..?

comment:2 @westi6 years ago

I would expect Passive FTP to be more supported that Active FTP as it does not rely on the ftp client machine which is likely to be behind a firewall having to accept connections.

Is it possible and more sensible to just default all FTP transports to Passive?

comment:3 @westi6 years ago

  • Component changed from General to Upgrade
  • Owner anonymous deleted

comment:4 @DD326 years ago

Is it possible and more sensible to just default all FTP transports to Passive?

Its definately possible, As for how many hosts will support it.

I say go for Passive, If reports come in before end of beta testing that previously working FTP connections are now failing, Add the Passive option, else just default to passive for everything?

From the patch, adding the single line

82	                        @ftp_pasv( $this->link, 1 );

would be enough (though, lets use true instead?)

comment:5 @westi6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9833]) Switch the ftpext filesystem to use Passive FTP aswell. Fixes #7940 props mcs_trekkie.

Note: See TracTickets for help on using tickets.