Cyberduck Mountain Duck CLI

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5763 closed defect (fixed)

Fallback for local address returned by the server for PASV

Reported by: g0ran Owned by: dkocher
Priority: normal Milestone: 4.0.2
Component: ftp Version: Nightly Build
Severity: normal Keywords: ftp
Cc: Architecture: Intel
Platform: Mac OS X 10.6

Description (last modified by dkocher)

After upgrading on 4.xx (4.01 and 4.02) version my ftp stuck every time on directory listing and after while Operation timed out error (regular ftp and ftp-tls). On 3.8.1 version everything is working fine. Here is log:

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 5 allowed.
220-Local time is now 13:23. Server port: 21.
220 You will be disconnected after 10 minutes of inactivity.
AUTH TLS
234 AUTH TLS OK.
USER gost
331 User gost OK. Password required
PASS ********
230 OK. Current restricted directory is /
PBSZ 0
200 PBSZ=0
PROT P
200 Data protection level set to "private"
FEAT
211-Extensions supported:
 EPRT
 IDLE
 MDTM
 SIZE
 REST STREAM
 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
 MLSD
 ESTP
 PASV
 EPSV
 SPSV
 ESTA
 AUTH TLS
 PBSZ
 PROT
 UTF8
211 End.
OPTS UTF8 ON
200 OK, UTF-8 enabled
PWD
257 "/" is your current location
NOOP
200 Zzz...
SYST
215 UNIX Type: L8
CWD /
250 OK. Current directory is /
TYPE A
200 TYPE is now ASCII
PASV
227 Entering Passive Mode (192,168,100,51,27,100)

Change History (16)

comment:1 Changed 8 years ago by dkocher

  • Description modified (diff)

comment:2 Changed 8 years ago by g0ran

here is log with working 3.8.1:

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 5 allowed.
220-Local time is now 13:52. Server port: 21.
220 You will be disconnected after 10 minutes of inactivity.
AUTH TLS
234 AUTH TLS OK.
USER gost
331 User gost OK. Password required
PASS ********
230 OK. Current restricted directory is /
PBSZ 0
200 PBSZ=0
PROT P
200 Data protection level set to "private"
FEAT
211-Extensions supported:
 EPRT
 IDLE
 MDTM
 SIZE
 REST STREAM
 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
 MLSD
 ESTP
 PASV
 EPSV
 SPSV
 ESTA
 AUTH TLS
 PBSZ
 PROT
 UTF8
211 End.
OPTS UTF8 ON
200 OK, UTF-8 enabled
PWD
257 "/" is your current location
NOOP
200 Zzz...
SYST
215 UNIX Type: L8
STAT /
213-STAT
drwxr-xr-x    2 0          0                1024 Mar 10 08:59 .
drwxr-xr-x    2 0          0                1024 Mar 10 08:59 ..
drwxrwxrwx    1 0          0                  20 Mar 10 08:59 public
213 End.

comment:3 Changed 8 years ago by dkocher

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

Default back to use STAT in r8536. There is still a configuration issue with this server advertising a local adress for the passive data connection. File transfers will possibly fail.

comment:4 follow-up: Changed 8 years ago by g0ran

ftp server is behind DynDNS service, and it's working fine with 3.8.1 - no problems with download/upload files.

comment:5 in reply to: ↑ 4 Changed 8 years ago by dkocher

Replying to g0ran:

ftp server is behind DynDNS service, and it's working fine with 3.8.1 - no problems with download/upload files.

It might work. If the server returns a local network address such as above in reply to PASV and you have connected to a non local address, it will ignore the address and use the address you connected to initially.

comment:6 Changed 8 years ago by g0ran

I upgraded to (8537) and it is partially working. I now can access listing and some dirs but some stucks again.

STAT /Volume_1
213-STAT
drwxrwxrwx   16 0          0                4096 Mar 10 14:37 .
drwxr-xr-x    2 0          0                1024 Mar 10 14:32 ..
drwx------    3 0          0                4096 Mar  9 20:30 .systemfile
drwxr-xr-x    5 501        allaccount       4096 Mar 10 08:58 .transmission-daemon
drwxrwxrwx    3 0          0                4096 Mar  9 16:37 Ajaxpf
drwxrwxrwx    2 501        allaccount       4096 Mar  9 20:31 DNS-320 files
drwxrwxrwx    2 501        allaccount       4096 Mar 10 14:41 Download
drwxrwxrwx    5 goran      allaccount       4096 Mar  9 22:30 GPS
drwx------    2 501        allaccount       4096 Mar  9 16:37 Nas_Prog
drwxrwxrwx    4 goran      allaccount       4096 Mar  9 23:25 backup
drwxr-xr-x   16 0          0                4096 Feb  8 22:58 ffp
-rw-r--r--    1 0          0                7062 Mar 10 08:58 ffp.log
drwxrwsrwx   10 501        allaccount       4096 Mar  9 22:39 filmovi
-rwxrwxrwx    1 goran      allaccount       1790 Mar  2 20:03 fun_plug
-rwxrwxrwx    1 501        allaccount        569 Sep 21 21:34 fun_plug.debian
-rwxrwxrwx    1 501        allaccount       1790 Mar  2 20:03 fun_plug.ffp
drwxrwxrwx   16 501        allaccount       4096 Mar  6 21:07 iTunes
drwxrwxrwx    2 501        allaccount       4096 Mar 10 14:45 public
drwxr-xr-x   20 0          0                4096 Mar  4 00:42 squeeze
drwxr-xr-x    5 0          0                4096 Mar  4 16:06 transmission-daemon
213 End.
NOOP
200 Zzz...
STAT /Volume_1/public
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 10 14:45 .
drwxrwxrwx    1 0          0                  13 Mar 10 14:32 ..
-rwxrwxrwx    1 goran      allaccount       1865 Mar 27  2010 goran.jpg
213 End.
NOOP
200 Zzz...
STAT /Volume_1/Download
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 10 14:41 .
drwxrwxrwx    1 0          0                  13 Mar 10 14:32 ..
213 End.
CWD /Volume_1/Download
250 OK. Current directory is /Volume_1/Download
TYPE A
200 TYPE is now ASCII
PASV
227 Entering Passive Mode (192,168,100,51,27,99)

comment:7 Changed 8 years ago by g0ran

I just checked in local network and everything is working fine. It seems that there is an issue with "..it will ignore the address and use the address you connected to initially." I tried also with some other clients and ftp from terminal and server is responding Passive mode is OK. Filezilla (working) responds with:

Response:	227 Entering Passive Mode (192,168,100,51,27,105)
Status:	Server sent passive reply with unroutable address. Using server address instead.

comment:8 Changed 8 years ago by dkocher

When STAT does not return any file we also request a directory listing with LIST for interoperability reasons (some servers do not send anything meaninful for STAT). LIST does need a seperate data connection for the transfer.

The log message from Filezilla is the same what I suggested above what Cyberduck would do as well but was indeed not previuosly the case. Not trust the local address returned by the server for PASV. I have fixed this with r8538.

comment:9 follow-up: Changed 8 years ago by g0ran

Thank you, you are really great (and extremely fast). I am almost embarrassed to bother you more but I now noticed one more issue - in one moment after uploading file and disconnecting on next session I can't delete/move/rename file.

STAT /Volume_1/Download
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 10 17:48 .
drwxrwxrwx    1 0          0                  13 Mar 10 14:32 ..
-rwxrwxrwx    1 goran      allaccount       1865 Mar 10 17:48 goran.jpg
213 End.
NOOP
200 Zzz...
DELE /Volume_1/Download/goran.jpg
550 Anonymous users can not delete files

I don't think that I'm anonymous (anonymous is disabled) and permissions are right. ;) It somehow thinks that I'm anonymous user.

comment:10 in reply to: ↑ 9 Changed 8 years ago by dkocher

Replying to g0ran:

Thank you, you are really great (and extremely fast). I am almost embarrassed to bother you more but I now noticed one more issue - in one moment after uploading file and disconnecting on next session I can't delete/move/rename file.

STAT /Volume_1/Download
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 10 17:48 .
drwxrwxrwx    1 0          0                  13 Mar 10 14:32 ..
-rwxrwxrwx    1 goran      allaccount       1865 Mar 10 17:48 goran.jpg
213 End.
NOOP
200 Zzz...
DELE /Volume_1/Download/goran.jpg
550 Anonymous users can not delete files

I don't think that I'm anonymous (anonymous is disabled) and permissions are right. ;) It somehow thinks that I'm anonymous user.

That is most certainly a bug with the server. Please contact the vendor.

comment:11 follow-up: Changed 8 years ago by g0ran

I don't think so. It just happens with Cyberduck. I tried several Mac and Win clients and also terminal ftp on Mac and Debian. Everywhere else works without any issues. I now receive error "553 Users may not upload files." and "550 Sorry, users are not allowed to create directories". version (8542) With 3.8.1 everything works as it should.

comment:12 in reply to: ↑ 11 Changed 8 years ago by dkocher

Replying to g0ran:

I don't think so. It just happens with Cyberduck. I tried several Mac and Win clients and also terminal ftp on Mac and Debian. Everywhere else works without any issues. I now receive error "553 Users may not upload files." and "550 Sorry, users are not allowed to create directories". version (8542) With 3.8.1 everything works as it should.

Can you again post both the working and non-working transcripts.

comment:13 follow-up: Changed 8 years ago by g0ran

3.8.1 (working everything ex. upload and mkdir):

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 5 allowed.
220-Local time is now 08:49. Server port: 21.
220 You will be disconnected after 10 minutes of inactivity.
AUTH TLS
234 AUTH TLS OK.
USER gost
331 User gost OK. Password required
PASS ********
230 OK. Current restricted directory is /
PBSZ 0
200 PBSZ=0
PROT P
200 Data protection level set to "private"
FEAT
211-Extensions supported:
 EPRT
 IDLE
 MDTM
 SIZE
 REST STREAM
 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
 MLSD
 ESTP
 PASV
 EPSV
 SPSV
 ESTA
 AUTH TLS
 PBSZ
 PROT
 UTF8
211 End.
OPTS UTF8 ON
200 OK, UTF-8 enabled
PWD
257 "/" is your current location
NOOP
200 Zzz...
SYST
215 UNIX Type: L8
STAT /
213-STAT
drwxr-xr-x    2 0          0                1024 Mar 10 23:55 .
drwxr-xr-x    2 0          0                1024 Mar 10 23:55 ..
drwxrwxrwx    1 0          0                  20 Mar 10 23:55 public
213 End.
NOOP
200 Zzz...
CWD /public
250 OK. Current directory is /public
STAT /public
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 10 14:45 .
drwxr-xr-x    2 0          0                1024 Mar 10 23:55 ..
-rwxrwxrwx    1 1007       allaccount       1865 Mar 27  2010 goran.jpg
213 End.
NOOP
200 Zzz...
STAT /public
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 11 08:49 .
drwxr-xr-x    2 0          0                1024 Mar 10 23:55 ..
-rwxrwxrwx    1 1007       allaccount       1865 Mar 27  2010 goran.jpg
-rw-r--r--    1 gost       allaccount       6014 Mar 11 08:49 propomed.jpg
213 End.
NOOP
200 Zzz...
MKD /public/qwe
257 "/public/qwe" : The directory was successfully created
NOOP
200 Zzz...
STAT /public
213-STAT
drwxrwxrwx    3 501        allaccount       4096 Mar 11 08:51 .
drwxr-xr-x    2 0          0                1024 Mar 10 23:55 ..
-rwxrwxrwx    1 1007       allaccount       1865 Mar 27  2010 goran.jpg
-rw-r--r--    1 gost       allaccount       6014 Mar 11 08:49 propomed.jpg
drwxrwxrwx    2 gost       allaccount       4096 Mar 11 08:51 qwe
213 End.

4.0.2 (8542) (not working upload/mkdir/rename/...)

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 5 allowed.
220-Local time is now 08:55. Server port: 21.
220 You will be disconnected after 10 minutes of inactivity.
AUTH TLS
234 AUTH TLS OK.
USER gost
331 User gost OK. Password required
PASS ********
230 OK. Current restricted directory is /
PBSZ 0
200 PBSZ=0
PROT P
200 Data protection level set to "private"
FEAT
211-Extensions supported:
 EPRT
 IDLE
 MDTM
 SIZE
 REST STREAM
 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
 MLSD
 ESTP
 PASV
 EPSV
 SPSV
 ESTA
 AUTH TLS
 PBSZ
 PROT
 UTF8
211 End.
OPTS UTF8 ON
200 OK, UTF-8 enabled
NOOP
200 Zzz...
SYST
215 UNIX Type: L8
STAT /public
213-STAT
drwxrwxrwx    2 501        allaccount       4096 Mar 11 08:54 .
drwxr-xr-x    2 0          0                1024 Mar 10 23:55 ..
-rwxrwxrwx    1 1007       allaccount       1865 Mar 27  2010 goran.jpg
213 End.
NOOP
200 Zzz...
MKD /public/qwe
550 Sorry, users are not allowed to create directories

Also I receive when try to upload:

553 Users may not upload files.

comment:14 in reply to: ↑ 13 Changed 8 years ago by dkocher

Replying to g0ran:

3.8.1 (working everything ex. upload and mkdir):

The issue is we are no more issueing a CWD command to change the current working directory when working with absolute paths. It is a Pure-FTPd bug if it can't cope with that. Can you please open an issue with the above transcript in their issue tracker.

comment:15 Changed 8 years ago by dkocher

#5781 closed as duplicate.

comment:16 Changed 8 years ago by dkocher

  • Summary changed from FTP stuck at listing directory to Fallback for local address returned by the server for PASV
Note: See TracTickets for help on using tickets.
swiss made software