Problem
When attempting to access a file using the FileZilla FTP client, the file either fails to load or loads only part of the file.
In the log the an error message is displayed which reads: ‘Could not read from transfer socket’.
You may also notice that files saved back to the FTP server are corrupted, with either the file not being complete or the file encoding being different (wrong).
Command: RETR abn-lookup-for-gravity-forms-fields.php Response: 150-Connecting to port 59441 Response: 150 14.5 kbytes to download Response: 226-File successfully transferred Response: 226 0.000 seconds (measured here), 89.25 Mbytes per second Error: Could not read from transfer socket: 10054 Error: File transfer failed
Solution
Before attempting a solution you may need to access the problem file using another resource (such as your content management system or your website cPanel) to ensure the file has not incomplete. The steps below will not help recovered incomplete files that have been corrupted by this error.
When I’ve experienced this issue I found that changing the transfer mode from ‘default’ (or passive) to ‘active’ fixed it.
- This can be done by opening the ‘Site Manager’
- selecting the entry for FTP server you’re having issues with,
- clicking on the ‘Transfer Settings’ tab
- and changing ‘Transfer mode’ to ‘Active’
- Click ‘OK’ to save the changes and reconnect to the FTP server.