Some servers require the user to be logged in to run FEAT
ftp://serverftp:2121: Connecting to FTP server
FTP Rx: "220 DrFTPD+ 2.0 (+STABLE+) $Revision: 1949 $ http://drftpd.org"
FTP Tx: "AUTH TLS"
FTP Rx: "234 AUTH TLS successful"
FTP Tx: "FEAT"
FTP Rx: "530 Not logged in."
This commit
4a68979b89 always return the ReadResponse error after an upload
Broke the error return from Stor(). If you attempt to upload a file
with Stor() and the io.Reader that you passed in returns an error,
this was not returned by the Stor() command leading the user to think
the file was uploaded correctly.
This was detected by rclone's unit tests and the exact commit was
pinpointed with git commit.
This commit fixes it by returning the error from io.Copy or the error
from ReadResponse - the latter if they are both set.
Fixes#198
if the upload failed we still need to try to read the server
response otherwise if the failure is not due to a connection problem,
for example the server denied the upload for quota limits, we miss
the response and we cannot use the connection to send other commands
Here is what happen before this patch:
C->S STOR test_file1.dat
S->C 150 Using transfer connection
S->C 550 Could not transfer file: denying write due to space limit
the client does not read the above 550 response and send the next command, so
the response for the STOR response will be readed as response for the next
command
pure-ftpd 1.0.49-4 as supplied as part of Ubuntu 20.04 advertises UTF8
support in the FEAT command but the OPTS command fails to turn it on.
OPTS UTF8 ON
504 Unknown command
This patch introduces a workaround to ignore the error which enables
this library to work with this version of pure-ftpd. Filezilla appears
to ignore this error in a similar way.
Add DialWithDialFunc to specify dial function used for both control and data connections
If used DialWithNetConn, DialWithNetConn takes precedence for
the control connection, while data connections will be established
using function specified with the DialWithDialFunc option
added tests for recursive delete
added change dir to fix test + refactor
fixed path issues
changes directory now instead of deleting by path
proftpd fix
added file edge case + more tests
added directory does not exist test
added correct directory after delete test
fixed correct directory test
renamed test directories + files
missed a renamed