ftp client does not honor .netrc macro definitions

Bug #1649075 reported by Alessandro Selli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
inetutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu version info:
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety

ftp client from:
Package: ftp
Version: 0.17-28

ftp client does not honor macro definitions in users' ~/.netrc file. According to man ftp(1) it should.
Example:

[alessandro@wkstn05 ~]$ cat ~/.netrc
default login ftp password <email address hidden>

macdef linux
 cd pub/linux/kernel/v4.x
 lcd ~/src

[alessandro@wkstn05 ~]$ ftp ftp.kernel.org
Connected to ftp.all.kernel.org.
220 Welcome to kernel.org
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> $linux
'linux' macro not found.
ftp> bye
221 Goodbye.
[alessandro@wkstn05 ~]$

However macro definitions do work when defined on the ftp prompt:

[alessandro@wkstn05 ~]$ ftp ftp.kernel.org
Connected to ftp.all.kernel.org.
220 Welcome to kernel.org
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> macdef linux
Enter macro line by line, terminating it with a null line
cd pub/linux/kernel/v4.x
lcd ~/src

ftp> $linux
cd pub/linux/kernel/v4.x
250 Directory successfully changed.
lcd ~/src
Local directory now /home/alessandro/src
ftp> bye
221 Goodbye.
[alessandro@wkstn05 ~]$

The ~/.netrc file is actually read, as the default login line does have effect.
I do not remember having this problem with ftp from Ubuntu xenial and previous releases.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.