Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 304 - ftp's mget doesn't work if runique is enabled
Summary: ftp's mget doesn't work if runique is enabled
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ftp
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1998-12-04 21:13 UTC by Red Hat Bugzilla
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1998-12-15 23:17:04 UTC

Attachments (Terms of Use)

Description Red Hat Bugzilla 1998-12-04 21:13:18 UTC
The ftp client has a bug. `mget'' doesn't get any files if
``runique'' is enabled. The problem is inconsistent naming
of temporary files which contain the list of remote files to

Example. Try this .netrc file on a directory that contains

  default login anonymous password user@host
  macdef init
  cd /pub/files
  mget *

Standard output will be something like this:

  230 Guest login ok, access restrictions apply.
  Interactive mode off.
  Receive unique on.
  cd /pub/files
  250 CWD command successful.
  mget *
  221 Goodbye.

Note that ``mget *'' doesn't retrieve any files at all.

More low-level description of the bug. A tmp file name is
created in source file cmds.c, function remglob(), variable
`temp''. In function recvrequest() a unique file name is
created in variable `local'' from the argument char pointer
in `temp''. In other words, gunique() in file ftp.c is
called and appends a .1 (,.2, and so on) to a path. The
output from FTP protocol command NLST is stored in file
/tmp/ftpa*.1. But remglob() tries to load the file contents
from the shorter name (/tmp/ftpa) that has not postfix. So
the mget() function doesn't reach its download loop and
exits without getting any file.

Whoever is more familiar with the code should have no
problems fixing this.

Comment 1 Red Hat Bugzilla 1998-12-15 23:17:59 UTC
This is fixed in the devel tree; it will appear in the next rawhide

Note You need to log in before you can comment on or make changes to this bug.