You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/08/28 18:52:45 UTC

DO NOT REPLY [Bug 43231] New: - The mod_proxy_ftp does not show directory listings with solaris ftp server.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43231>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43231

           Summary: The mod_proxy_ftp does not show directory listings with
                    solaris ftp server.
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: rahul@sun.com


The mod_proxy_ftp server does not show directory listing if the origin server 
is a solaris ftp server. I have verified that it happens only with Solaris Ftp 
server. If I request any other platform (checked FreeBSD) the page listing is 
fine.
-- Checking if the solaris system is setup correctly.
with a native ftp client
|ftp agneyam 
Connected to agneyam.india.sun.com.
220 agneyam FTP server ready.
Name : ftp
331 Guest login ok, send your complete e-mail address as password.
Password:
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
Makefile
squid.pkg
t
test
226 Transfer complete.
30 bytes received in 0.00047 seconds (62.66 Kbytes/s)
ftp> 

-- The same directory when viewed in browser
Directory of ftp://agneyam.india.sun.com/
----------------------------------------------
Guest login ok, access restrictions apply
----------------------------------------------
----------------------------------------------
>From looking at the code, Inside mod_proxy_ftp,

        /* read the body, pass it to the output filters */
        while (ap_get_brigade(data->input_filters,
                              bb,
                              AP_MODE_READBYTES,
                              APR_BLOCK_READ,
                              conf->io_buffer_size) == APR_SUCCESS) {
#ifdef DEBUGGING
            {
                apr_off_t readbytes;
                apr_brigade_length(bb, 0, &readbytes);
                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
                             r->server, "proxy (PID %d): readbytes: %#x",
                             getpid(), readbytes);
            }
#endif
            /* sanity check */
            if (APR_BRIGADE_EMPTY(bb)) {
                apr_brigade_cleanup(bb);
                break;
            }

            /* found the last brigade? */
            if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
                /* if this is the last brigade, cleanup the
                 * backend connection first to prevent the
                 * backend server from hanging around waiting
                 * for a slow client to eat these bytes
                 */
                ap_flush_conn(data);
                apr_socket_close(data_sock);
                data_sock = NULL;
                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                             "proxy: FTP: data connection closed");
                /* signal that we must leave */
                finish = TRUE;
            }

The APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb)) becomes true as soon as the while
loop is entered. thus there is no data coming in from the epasv data connection.

On the FtpServer and apache interaction, there seems to be a problem
-- Here is the interaction with a FreeBSD server on the data port(epsv)
|trans -v -l 2001 -r vayavyam:52190
trans[46930]:* 0 rules...
trans[46930]:Waiting for connections.
trans[46931]:Connect from 129.158.224.203 (ANY:2001->vayavyam:52190)
>[
total 10
dr-xr-xr-x  5 root  operator  512 Aug 28 14:32 .
dr-xr-xr-x  5 root  operator  512 Aug 28 14:32 ..
dr-xr-xr-x  2 root  operator  512 Aug 28 14:32 etc
drwxrwxrwt  2 root  operator  512 Aug 28 14:32 incoming
drwxr-xr-x  2 root  operator  512 Aug 28 14:32 pub
]
>[
]

--Here is the interaction with the Solaris 10 Ftpserver
(uname:SunOS agneyam 5.10 Generic sun4u sparc SUNW,Sun-Blade-1000)

|trans -v -l 2001 -r agneyam:19220 
trans[12814]:* 0 rules...
trans[12814]:Waiting for connections.
trans[12815]:Connect from 129.158.224.203 (ANY:2001->agneyam:19220)
>[
]
trans[12815]:Connect from 129.158.224.203 (ANY:2001->agneyam:19220) closed

As you can see, no data seems to be transfered even though the connection is
created just fine.

The control connection data is absolutely identical in both cases. So not
adding it here.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 43231] - The mod_proxy_ftp does not show directory listings with solaris ftp server.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43231>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43231





------- Additional Comments From rahul@sun.com  2007-09-11 04:26 -------
This has probably got to do with the solaris FTP server unable to understand
the -lag options passed in. See the transaction.
It understands only NLST (no LIST or LIST -lag)

|ftp -p agneyam
Connected to agneyam.
220 agneyam FTP server ready.
Name : anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (129,158,224,203,178,31)
150 Opening ASCII mode data connection for file list.
Makefile
squid.pkg
t
test
226 Transfer complete.
30 bytes received in 0.00064 seconds (46.11 Kbytes/s)
ftp> ls -l
227 Entering Passive Mode (129,158,224,203,214,138)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> ls -lag
227 Entering Passive Mode (129,158,224,203,215,58)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> 


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 43231] - The mod_proxy_ftp does not show directory listings with solaris ftp server.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43231>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43231





------- Additional Comments From rahul@sun.com  2007-09-11 06:17 -------
Created an attachment (id=20789)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20789&action=view)
A patch to recognize solaris ftp server and send NLST instead of LIST

The attachment sends SYST command at the start of the connection and if it
detects that it is a solaris ftp server, uses NLST instead of the LIST or LIST
-lag for
listing of files.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 43231] - The mod_proxy_ftp does not show directory listings with solaris ftp server.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43231>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43231


rahul@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org