bin/62232: Some FTP clients cannot display directory listings via
ftpd when logged in as non-guest
Bob Finch
bob+freebsd at nas.com
Sun Feb 1 14:40:16 PST 2004
>Number: 62232
>Category: bin
>Synopsis: Some FTP clients cannot display directory listings via ftpd when logged in as non-guest
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 01 14:40:03 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Bob Finch
>Release: 4.9-RELEASE
>Organization:
Network Access Services Inc.
>Environment:
FreeBSD romana.alphasoft.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Tue Jan 20 08:51:37 GMT 2004 bob at romana.alphasoft.com:/usr/src/sys/compile/ROMANA i386
>Description:
Some FTP clients, notably Mozilla and Internet Explorer, fail to display directory listings when logged in as a non-guest user to ftpd. It appears these clients depend on ftpd returning a 550 error when attempting to RETR a directory. ftpd returns the raw directory which the client downloads as a binary file instead of displaying a directory listing.
These clients do display directory listings correctly when logged in as a guest user (anonymous), since ftp returns a 550 error when RETRing a directory when logged in as anonymous.
>How-To-Repeat:
>From Mozilla, go to a FTP URL that refers to a directory and is not anonymous, e.g. ftp://someuser@some.site/some/dir/
>Fix:
The problem was introduced in revision 1.62.2.46 of src/libexec/ftpd/ftpd.c that allows non-guest users to download special files. One fix would be to change
if (guest) {
to
if (guest || S_ISDIR(st.st_mode)) {
which would make ftpd always return a 550 error when attempting to RETR a directory.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list