Bug 97376

Summary: ftp remote glob expansion works only with vsftpd using LIST
Product: [Retired] Red Hat Linux Reporter: Steve Brown <sbrown7>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED CANTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-29 19:49:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Brown 2003-06-13 20:12:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Description of problem:
Doing an ftp (or http) update from server using built in ftp (and http) client
fails to expand globs: 
rpm -Uvh ftp.server.name/path/to/rpms/*.rpm
fails silently, ftp server logs simply show that the anonymous login is
successful, then the session closes with no requests.

Version-Release number of selected component (if applicable):
rpm-4.1-1.06

How reproducible:
Always

Steps to Reproduce:
1.rpm -Uvh ftp://ftp.umbc.edu/rhupdate/afs/8.0/openafs*.rpm
2.
3.
    

Actual Results:  fails silently with cursor returning to following line

Expected Results:  Should install the following three RPMs:
openafs-1.2.9-rh8.0.2.i386.rpm
openafs-kernel-1.2.9-rh8.0.2.i386.rpm
openafs-client-1.2.9-rh8.0.2.i386.rpm

Additional info:

Comment 1 Jeff Johnson 2003-06-13 20:25:59 UTC
Can you add --ftpdebug and append results?

I suspect the problem is the server, however, If wu-ftpd,
then that's the problem, although I've forgotten details ATM
(there's a similar bug about 4-6 months ago).

Comment 2 Steve Brown 2003-06-13 20:39:09 UTC
Yes, it's wu-ftpd -- here's the output you wanted:
[root@oit-82-25 root]# /bin/rpm -Uvh --ftpdebug
ftp://ftp.umbc.edu/rhupdate/afs/8.0/openafs*.rpm
*** ftpOpendir(ftp://ftp.umbc.edu/rhupdate/afs/8.0)
++ connect 130.85.24.27:21 on fdno 3
<- 220 ragnarok.umbc.edu FTP server (Version wu-2.6.1(3) Thu Jun 28 19:17:44 EDT
2001) ready.
-> USER anonymous
<- 331 Guest login ok, send your complete e-mail address as password.
-> PASS root@
<- 230 Guest login ok, access restrictions apply.
-> TYPE I
<- 200 Type set to I.
-> PASV
<- 227 Entering Passive Mode (130,85,24,27,223,74)
-> LIST /rhupdate/afs/8.0
<- 150 Opening BINARY mode data connection for /bin/ls.
<- 226 Transfer complete.
*** ftpReaddir(0x826eb70) 0x826eba0 "."
*** ftpReaddir(0x826eb70) 0x826eba0 ".."
*** ftpClosedir(0x826eb70)
[root@oit-82-25 root]# 


Comment 3 Jeff Johnson 2003-06-13 20:51:48 UTC
See the LIST line? Can you try with a ftp client,
sending first the LIST command, then a NLST command?

I predict the NLST command will work, but, unfortunately,
the LIST command is needed with current vsftpd on linux.

No easy solution here

Comment 4 Steve Brown 2003-06-13 20:58:25 UTC
Hmmm... none of those seem to work:
ftp> cd rhupdate/afs/8.0
250 CWD command successful.
ftp> ls 
227 Entering Passive Mode (130,85,24,27,65,179)
150 Opening ASCII mode data connection for /bin/ls.
total 19368
-rw-r--r--    1 sys      5011501 Jun  6 11:22 openafs-1.2.9-rh8.0.2.i386.rpm
-rw-r--r--    1 sys       559370 Jun  6 11:22 openafs-client-1.2.9-rh8.0.2.i386.rpm
-rw-r--r--    1 sys      4339900 Jun  6 11:22 openafs-kernel-1.2.9-rh8.0.2.i386.rpm
226 Transfer complete.
ftp> LIST
?Invalid command
ftp> NLST
?Invalid command
ftp> LIST /rhupdate/afs/8.0
?Invalid command
ftp> NLST /rhupdate/afs/8.0
?Invalid command
ftp> 


Comment 5 Steve Brown 2003-06-13 21:02:41 UTC
My bad!  Case sensitive:
ftp> cd rhupdate/afs/8.0
250 CWD command successful.
ftp> list 
?Invalid command
ftp> nlist
227 Entering Passive Mode (130,85,24,27,66,76)
150 Opening ASCII mode data connection for file list.
openafs-1.2.9-rh8.0.2.i386.rpm
openafs-client-1.2.9-rh8.0.2.i386.rpm
openafs-kernel-1.2.9-rh8.0.2.i386.rpm
226 Transfer complete.
ftp> 


Comment 6 Steve Brown 2003-06-13 21:16:16 UTC
Grr.. still more confusion to add:
ftp> debug
Debugging on (debug=1).
ftp> ls
ftp: setsockopt (ignored): Permission denied
---> PASV
227 Entering Passive Mode (130,85,24,27,166,54)
---> LIST
150 Opening ASCII mode data connection for /bin/ls.
total 19368
-rw-r--r--    1 sys      5011501 Jun  6 11:22 openafs-1.2.9-rh8.0.2.i386.rpm
-rw-r--r--    1 sys       559370 Jun  6 11:22 openafs-client-1.2.9-rh8.0.2.i386.rpm
-rw-r--r--    1 sys      4339900 Jun  6 11:22 openafs-kernel-1.2.9-rh8.0.2.i386.rpm
226 Transfer complete.
ftp> 


Comment 7 Steve Brown 2003-06-16 14:28:00 UTC
I had a chance to look deeper at this issue over the weekend -- the response of an
rpm -Uvh <some file glob with a '*' in it> 
is the same as 
rpm -Uvh ""  -- that's a null string

Also note that the version of rpm in the 7.3 updates (rpm-4.0.4-7x.18) works
fine against the same ftp server.  And note in the comments above that the 4.1
version opened a BINARY mode transfer (er, the server did, on the client's
behalf) but the ftp client did an ASCII transfer, and I'd bet that the old
version managed to trigger an ASCII transfer as well (I'll check if you wish).

Comment 8 Paul Nasrat 2005-11-29 19:49:39 UTC
Red Hat 8.0 is no longer supported if this bug is currently valid against rpm in
Fedora Core 4 or Fedora Core 5 Test 1 please reopen.