New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smarter FTP passive mode #51416
Comments
I have come accross an FTP server which lftp (an Unix command-line 220 172.29.AAA.BBB FTP server ready FEAT 211-Features: 211 End LANG 200 Using default language en OPTS UTF8 ON 200 UTF8 set to on USER XXXX PASS XXXX PWD 257 "/" is the current directory PASV 227 Entering Passive Mode (172,29,AAA,BBB,195,84). LIST 150 Opening ASCII mode data connection for file list 226 Transfer complete As you see, lftp had no problem opening a data connection. It probably |
At least we could add an optional argument to set_pasv() so as to ignore |
If the server is behind a NAT it should be up to the administrator to |
Yes, probably. The point was only that lftp seemed to be able to handle |
Closing following Giampaolo's suggestion. |
I understand the standpoint that the server is configured incorrectly, and I see why this might not be the best solution to the problem. But not everyone owns the ftp server they're connecting to. And the Would it not be sensible to give users the option to use just Curl for example defaults to EPSV and then falls back to PASV when it's not supported by the server. The ftp client in macos also defaults to EPSV. I'm not sugesting we do that, but it would be nice if we could tell the ftplib to use EPSV without it being a ipv6 address. In our specific situation, we have an ftp server that has a public and a private endpoint on different ip addresses, and the ftp server is configured to use the public ip address, but if we want to access in internally we need to use the internal host and ip address. This causes We currently monkey patch ftplib to use |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: