Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383933 - net-ftp/twoftpd-1.41: ls /no/such/dir break protocol
Summary: net-ftp/twoftpd-1.41: ls /no/such/dir break protocol
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: Pending Removal: 2012-04-06
Keywords: NeedPatch, PMASKED
Depends on:
Blocks:
 
Reported: 2011-09-21 11:12 UTC by Alex Efros
Modified: 2012-04-06 19:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2011-09-21 11:12:00 UTC
I've sent 4 days ago report about this issue to upstream, but got no reply yet.

Because of this issue I had to downgrade to twoftpd-1.21, which require cvm-0.76, which have parallel build issue just like cvm-0.96 (see bug 310843). So, I'm opening this bug to make sure twoftpd-1.21 will not be removed from portage until this issue will be resolved, and to argument needs in fixing parallel build issue for cvm-0.76.


If try to "ls /no/such/dir" on 1.41, something goes wrong, and several
next commands result incorrect results. On 1.21 there is no such issue.

Versions used:
a) twoftpd-1.41, cvm-0.96, bglibs-1.106
b) twoftpd-1.21, cvm-0.76, bglibs-1.041

Example of failed session ("ls /a" break twoftpd because there is no /a
directory; I've removed some directories from listing to make it shorter):

$ ftp MYSERVER.com
Connected to MYSERVER.com (a.b.c.d).
220-TwoFTPd server ready.
220 Authenticate first.
502 Command not supported.
SSL not available
331 Send PASS.
230 Ready to transfer files.
hash
Hash mark printing on (1024 bytes/hash mark).
bin
200 Transfer mode changed to BINARY.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 OK.
150 Opened data connection.
drwxr-xr-x    1 powerman ftp           640 Dec 28  2008 max
drwxr-xr-x    1 powerman ftp            72 Jan  6  2010 www
[...cut...]
226 Transfer completed (346 bytes sent, 1279kB/s).
ftp> ls /a
200 OK.
550 Could not access file.
ftp> ls
150 Opened data connection.
ftp> ls
226 Transfer completed (0 bytes sent, 0B/s).
200 OK.
ftp> ls
200 OK.
150 Opened data connection.
drwxr-xr-x    1 powerman ftp           640 Dec 28  2008 max
drwxr-xr-x    1 powerman ftp            72 Jan  6  2010 www
[...cut...]
226 Transfer completed (346 bytes sent, 9101B/s).
ftp> ls /a
200 OK.
150 Opened data connection.
226 Transfer completed (346 bytes sent, 1941kB/s).
ftp> ls
200 OK.
550 Could not access file.
ftp> ls
150 Opened data connection.
ftp> exit
226 Transfer completed (0 bytes sent, 0B/s).

Here is how it looks like on 1.21:

[...cut...]
Using binary mode to transfer files.
ftp> ls
200 OK.
150 Opened data connection.
drwxr-xr-x    1 powerman ftp           640 Dec 28  2008 max
drwxr-xr-x    1 powerman ftp            72 Jan  6  2010 www
[...cut...]
226 Listing complete (346 bytes sent).
ftp> ls /a
200 OK.
150 Opened data connection.
226 Listing complete (0 bytes sent).
ftp> ls
200 OK.
150 Opened data connection.
drwxr-xr-x    1 powerman ftp           640 Dec 28  2008 max
drwxr-xr-x    1 powerman ftp            72 Jan  6  2010 www
[...cut...]
226 Listing complete (346 bytes sent).
ftp> ls /a
200 OK.
150 Opened data connection.
226 Listing complete (0 bytes sent).
ftp> ls
200 OK.
150 Opened data connection.
drwxr-xr-x    1 powerman ftp           640 Dec 28  2008 max
drwxr-xr-x    1 powerman ftp            72 Jan  6  2010 www
[...cut...]
226 Listing complete (346 bytes sent).
ftp> exit
221 Bye.

This bug breaks Wordpress plugin/theme auto-install/update feature because
after logging to ftp Wordpress trying to detect installation path and send
it first "ls" command with non-existing path param, which in turn break
answers to next several commands.
Comment 1 Pacho Ramos gentoo-dev 2012-03-04 10:41:41 UTC
This package is dead for a long time, last release from 2008 and upstream dead. I think we should remove this.
Comment 2 Dean Hall 2012-03-07 22:11:44 UTC
On the contrary, the last release is 1.42, from April, 2011: https://github.com/bruceg/twoftpd/commits/master

I'm not sure if it resolves this bug, but since you mentioned this package is "dead", and I rely on it, I thought I'd correct you on that.

(If ebuild maintenance is an issue, I'm glad to help or take over if needed.)
Comment 3 Pacho Ramos gentoo-dev 2012-03-08 09:41:18 UTC
I see no tarball for that 1.42 version, and it's homepage is completely outdated:
http://untroubled.org/twoftpd/

(a commit to set version to 1.42 only means upstream planned to release a 1.42 version including that commits but he never did that)
Comment 4 Dean Hall 2012-03-10 06:02:30 UTC
Fair enough. I've emailed the author but haven't heard anything. I guess I'll have to find another anonymous-only FTP server.
Comment 5 Pacho Ramos gentoo-dev 2012-04-06 19:39:12 UTC
dropped