* [gentoo-user] setsockopt SO_DEBUG - ftp connection problems @ 2011-07-05 11:58 Mick 2011-07-05 13:48 ` Michael Orlitzky 2011-07-05 18:42 ` Paul Hartman 0 siblings, 2 replies; 8+ messages in thread From: Mick @ 2011-07-05 11:58 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 1718 bytes --] Hi All, I am using tnftp to login to a vsFTPd 2.2.2 server: ========================= Connected to ftp_host.com. 220 (vsFTPd 2.2.2) ftp_login: user `mick_login' pass `<null>' host `ftp_host.com' ---> USER mick_login 331 Please specify the password. Password: ---> PASS XXXX 230 Login successful. ---> SYST 215 UNIX Type: L8 Remote system type is UNIX. Using binary mode to transfer files. ---> FEAT 211-Features: EPRT EPSV MDTM PASV REST STREAM SIZE TVFS UTF8 211 End features[FEAT_FEAT] = 1 features[FEAT_MDTM] = 1 features[FEAT_MLST] = 0 features[FEAT_REST_STREAM] = 1 features[FEAT_SIZE] = 1 features[FEAT_TVFS] = 1 got localcwd as `/home/michael' ---> PWD 257 "/" got remotecwd as `/' ---> TYPE I ========================= So far so good, but then I get this response when I try to list stuff: ========================= ftp> ls ---> TYPE A 200 Switching to ASCII mode. tnftp: setsockopt SO_DEBUG (ignored): Permission denied ---> EPSV 229 Entering Extended Passive Mode (|||62430|) 229 Entering Extended Passive Mode (|||62430|) .... ========================= it just hangs here until it times out and drops the connection. Without debug I see this: ========================= 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. 200 Switching to Binary mode. ftp> pwd Remote directory: / ftp> ls 229 Entering Extended Passive Mode (|||17721|) ========================= If I try the same thing with Konqueror there is no problem, I login and Konqueror immediately lists the directory contents. How can I see what Konqueror's ftp client sends to and receives from the server? -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 11:58 [gentoo-user] setsockopt SO_DEBUG - ftp connection problems Mick @ 2011-07-05 13:48 ` Michael Orlitzky 2011-07-05 15:29 ` Mick 2011-07-05 18:42 ` Paul Hartman 1 sibling, 1 reply; 8+ messages in thread From: Michael Orlitzky @ 2011-07-05 13:48 UTC (permalink / raw To: gentoo-user On 07/05/2011 07:58 AM, Mick wrote: > > If I try the same thing with Konqueror there is no problem, I login and > Konqueror immediately lists the directory contents. How can I see what > Konqueror's ftp client sends to and receives from the server? log_ftp_protocol When enabled, all FTP requests and responses are logged, providing the option xferlog_std_format is not enabled. Useful for debugging. Default: NO ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 13:48 ` Michael Orlitzky @ 2011-07-05 15:29 ` Mick 2011-07-05 18:15 ` Michael Orlitzky 0 siblings, 1 reply; 8+ messages in thread From: Mick @ 2011-07-05 15:29 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 643 bytes --] On Tuesday 05 Jul 2011 14:48:24 Michael Orlitzky wrote: > On 07/05/2011 07:58 AM, Mick wrote: > > If I try the same thing with Konqueror there is no problem, I login and > > Konqueror immediately lists the directory contents. How can I see what > > Konqueror's ftp client sends to and receives from the server? > > log_ftp_protocol > > When enabled, all FTP requests and responses are logged, providing > the option xferlog_std_format is not enabled. Useful for debugging. > > Default: NO Thanks Michael, where am I supposed to set this up? I do not have access to the ftp server, or its logs. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 15:29 ` Mick @ 2011-07-05 18:15 ` Michael Orlitzky 0 siblings, 0 replies; 8+ messages in thread From: Michael Orlitzky @ 2011-07-05 18:15 UTC (permalink / raw To: gentoo-user On 07/05/2011 11:29 AM, Mick wrote: >> >> log_ftp_protocol >> > > Thanks Michael, where am I supposed to set this up? I do not have access to > the ftp server, or its logs. Oh. It would have gone in vsftpd.conf. Um, wireshark your FTP conversation? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 11:58 [gentoo-user] setsockopt SO_DEBUG - ftp connection problems Mick 2011-07-05 13:48 ` Michael Orlitzky @ 2011-07-05 18:42 ` Paul Hartman 2011-07-05 19:34 ` Mick 1 sibling, 1 reply; 8+ messages in thread From: Paul Hartman @ 2011-07-05 18:42 UTC (permalink / raw To: gentoo-user On Tue, Jul 5, 2011 at 6:58 AM, Mick <michaelkintzios@gmail.com> wrote: > 200 Switching to ASCII mode. > tnftp: setsockopt SO_DEBUG (ignored): Permission denied > ---> EPSV > 229 Entering Extended Passive Mode (|||62430|) > 229 Entering Extended Passive Mode (|||62430|) Don't use EPSV, use PASV instead, hopefully that will work. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 18:42 ` Paul Hartman @ 2011-07-05 19:34 ` Mick 2011-07-05 19:50 ` Paul Hartman 0 siblings, 1 reply; 8+ messages in thread From: Mick @ 2011-07-05 19:34 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 1114 bytes --] On Tuesday 05 Jul 2011 19:42:53 Paul Hartman wrote: > On Tue, Jul 5, 2011 at 6:58 AM, Mick <michaelkintzios@gmail.com> wrote: > > 200 Switching to ASCII mode. > > tnftp: setsockopt SO_DEBUG (ignored): Permission denied > > ---> EPSV > > 229 Entering Extended Passive Mode (|||62430|) > > 229 Entering Extended Passive Mode (|||62430|) > > Don't use EPSV, use PASV instead, hopefully that will work. I tried defining passive when in the session. It was in passive by default, so I had to toggle it back on again: got remotecwd as `/' ---> TYPE I 200 Switching to Binary mode. ftp> passive Passive mode: off; fallback to active mode: off. ftp> passive Passive mode: on; fallback to active mode: on. ftp> ls ---> TYPE A 200 Switching to ASCII mode. tnftp: setsockopt SO_DEBUG (ignored): Permission denied ---> EPSV 229 Entering Extended Passive Mode (|||9832|) 229 Entering Extended Passive Mode (|||9832|) How can I control it to not go into extended passive? PS. The server reports EPSV in its features, so I am not sure why it would not work with EPSV. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 19:34 ` Mick @ 2011-07-05 19:50 ` Paul Hartman 2011-07-05 20:31 ` Mick 0 siblings, 1 reply; 8+ messages in thread From: Paul Hartman @ 2011-07-05 19:50 UTC (permalink / raw To: gentoo-user On Tue, Jul 5, 2011 at 2:34 PM, Mick <michaelkintzios@gmail.com> wrote: > On Tuesday 05 Jul 2011 19:42:53 Paul Hartman wrote: >> On Tue, Jul 5, 2011 at 6:58 AM, Mick <michaelkintzios@gmail.com> wrote: >> > 200 Switching to ASCII mode. >> > tnftp: setsockopt SO_DEBUG (ignored): Permission denied >> > ---> EPSV >> > 229 Entering Extended Passive Mode (|||62430|) >> > 229 Entering Extended Passive Mode (|||62430|) >> >> Don't use EPSV, use PASV instead, hopefully that will work. > > I tried defining passive when in the session. It was in passive by default, > so I had to toggle it back on again: > > got remotecwd as `/' > ---> TYPE I > 200 Switching to Binary mode. > ftp> passive > Passive mode: off; fallback to active mode: off. > ftp> passive > Passive mode: on; fallback to active mode: on. > ftp> ls > ---> TYPE A > 200 Switching to ASCII mode. > tnftp: setsockopt SO_DEBUG (ignored): Permission denied > ---> EPSV > 229 Entering Extended Passive Mode (|||9832|) > 229 Entering Extended Passive Mode (|||9832|) > > How can I control it to not go into extended passive? > > PS. The server reports EPSV in its features, so I am not sure why it would not > work with EPSV. FTP is the bastard protocol from hell. There are more ways it can go wrong than right. :) Firewalls especially love to silently rewrite FTP commands and port mappings. It can be a real PITA to debug. So, even if your client supports EPSV and your server supports EPSV, if firewall/router in-between does not then it could still break things. Even if you wireshark the session on your computer, what you see may not match what's being sent to the remote server, and vice-versa. Standard PASV mode is much more widely supported than EPSV mode, so that's the line of thought that brought me to suggest trying that. I've never used tnftp but from the manpage I googled, it looks like "epsv4 off " is the command to toggle EPSV off. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] setsockopt SO_DEBUG - ftp connection problems 2011-07-05 19:50 ` Paul Hartman @ 2011-07-05 20:31 ` Mick 0 siblings, 0 replies; 8+ messages in thread From: Mick @ 2011-07-05 20:31 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 2513 bytes --] On Tuesday 05 Jul 2011 20:50:55 Paul Hartman wrote: > On Tue, Jul 5, 2011 at 2:34 PM, Mick <michaelkintzios@gmail.com> wrote: > > On Tuesday 05 Jul 2011 19:42:53 Paul Hartman wrote: > >> On Tue, Jul 5, 2011 at 6:58 AM, Mick <michaelkintzios@gmail.com> wrote: > >> > 200 Switching to ASCII mode. > >> > tnftp: setsockopt SO_DEBUG (ignored): Permission denied > >> > ---> EPSV > >> > 229 Entering Extended Passive Mode (|||62430|) > >> > 229 Entering Extended Passive Mode (|||62430|) > >> > >> Don't use EPSV, use PASV instead, hopefully that will work. > > > > I tried defining passive when in the session. It was in passive by > > default, so I had to toggle it back on again: > > > > got remotecwd as `/' > > ---> TYPE I > > 200 Switching to Binary mode. > > ftp> passive > > Passive mode: off; fallback to active mode: off. > > ftp> passive > > Passive mode: on; fallback to active mode: on. > > ftp> ls > > ---> TYPE A > > 200 Switching to ASCII mode. > > tnftp: setsockopt SO_DEBUG (ignored): Permission denied > > ---> EPSV > > 229 Entering Extended Passive Mode (|||9832|) > > 229 Entering Extended Passive Mode (|||9832|) > > > > How can I control it to not go into extended passive? > > > > PS. The server reports EPSV in its features, so I am not sure why it > > would not work with EPSV. > > FTP is the bastard protocol from hell. There are more ways it can go > wrong than right. :) Yes, I can attest to this! :@ > Firewalls especially love to silently rewrite FTP > commands and port mappings. It can be a real PITA to debug. So, even > if your client supports EPSV and your server supports EPSV, if > firewall/router in-between does not then it could still break things. I've turned off my machine's firewall thinking that all this passive/active malarkey was causing the problem, but couldn't do anything about the router's firewall. > Even if you wireshark the session on your computer, what you see may > not match what's being sent to the remote server, and vice-versa. > > Standard PASV mode is much more widely supported than EPSV mode, so > that's the line of thought that brought me to suggest trying that. > > I've never used tnftp but from the manpage I googled, it looks like > "epsv4 off " is the command to toggle EPSV off. YES! :-) That's what was causing the problem, it was EPSV. I assume that Konqueror switches it off and tnftp has it on by default. Thank you very much. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-05 20:32 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-07-05 11:58 [gentoo-user] setsockopt SO_DEBUG - ftp connection problems Mick 2011-07-05 13:48 ` Michael Orlitzky 2011-07-05 15:29 ` Mick 2011-07-05 18:15 ` Michael Orlitzky 2011-07-05 18:42 ` Paul Hartman 2011-07-05 19:34 ` Mick 2011-07-05 19:50 ` Paul Hartman 2011-07-05 20:31 ` Mick
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox