Bug 31467

Summary: ncftpput command does not work with the -f flag, nor is it fuctional with -p and -u flags.
Product: [Retired] Red Hat Linux Reporter: Mark Wilson <wilsodm>
Component: ncftpAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-24 22:53:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mark Wilson 2001-03-11 23:57:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)

When I use the -f flag for the ncftpput command, an error message appears:
ncftpput: Could not change to directory /tmp: server said: tmp: No such 
file or directory.
The directory exists on the remote server.  This always happens, 
regardless of the target directory on the remote server.

Here is an example when the "-d stdout" flag is used...

Remote server is running wu-ftpd.
220: shaggy.telecom.auburn.edu FTP server (Version wu-2.6.1(1) Wed Aug 9 
05:54:50 EDT 2000) ready.
Connected to
Cmd: USER snort
331: Password required for snort.
Cmd: PASS xxxxxxxx
230: User snort logged in.
Cmd: PWD
257: "/usr/local2/home/snort" is current directory.
Logged in to as snort.
500: 'FEAT': command not understood.
214: The following SITE commands are recognized (* =>'s unimplemented).
        UMASK           GROUP           INDEX           GROUPS 
        IDLE            GPASS           EXEC            CHECKMETHOD 
        CHMOD           NEWER           ALIAS           CHECKSUM 
        HELP            MINFO           CDPATH 
     Direct comments to root@localhost.
Cmd: CLNT NcFTPPut 3.0.1 
500: 'CLNT NcFTPPut 3.0.1 ': command not understood.
Cmd: CWD usr
550: usr: No such file or directory.
ncftpput: Could not change to directory /usr/local2/home/snort: server 
said: usr: No such file or directory.
221: You have transferred 0 bytes in 0 files.
     Total traffic for this session was 786 bytes in 0 transfers.
     Thank you for using the FTP service on shaggy.telecom.auburn.edu.

The file is never transferred.

Reproducible: Always
Steps to Reproduce:
1.transfer a file to a remote server using ncftpput command.  
2.Pick any file and choose a username on remote server
3.make a file on client (named /tmp/ncftp_file) with the following entries:
host www.redhat.com
user joeuser
pass abc123

of course these must be valid.

4. Copy file /tmp/file.txt to /tmp on www.redhat.com using the following 
ncftpput command:
/usr/bin/ncftpput -f /tmp/ncftp_file -d stdout /tmp /tmp/file.txt


Actual Results:  File will not be transferred.  Following error will appear
ncftpput: Could not change to directory /tmp: server said: tmp: No such 
file or directory.

Expected Results:  File is transferred to remote host.

Error messages are shown above.  
Use the "-d stdout" flag to get more detailed output from ncftpput command.
I used this command all the time on RedHat 6.2.  
On RedHat 7.0, version is ncftp-3.0.1-7.  I don't recall version on 6.2

Comment 1 Bernhard Rosenkraenzer 2002-02-21 16:16:19 UTC
Fixed in 3.1.1. 
(Don't worry about the "unknown command"s, FEAT and friends are commands from the current 
draft of the next revision of the ftp protocol). 
ncftpput -f /tmp/ncftp_file -d stdout /tmp /tmp/ncftp_file 
220: ready, dude (vsFTPd 1.0.1: beat me, break me) 
Connected to ftp.bero.org. 
Cmd: USER bero 
331: Please specify the password. 
Cmd: PASS xxxxxxxx 
230: Login successful. Have fun. 
Cmd: PWD 
257: "/home/bero" 
Logged in to ftp.bero.org as bero. 
Cmd: FEAT 
500: Unknown command. 
502: Sorry, I don't do help. 
Cmd: CLNT NcFTPPut 3.1.1 linux-x86 
500: Unknown command. 
Cmd: CWD /tmp 
250: Directory successfully changed. 
Cmd: TYPE I 
200: Binary it is, then. 
Cmd: SIZE ncftp_file 
550: Could not get file size. 
Cmd: PASV 
227: Entering Passive Mode (193,103,254,20,48,198) 
Cmd: STOR ncftp_file 
150: Go ahead make my day^W^W^Wsend me the data. 
/tmp/ncftp_file:                   ETA:   0:00   44.00/ 44.00 B   558.04 kB/s  226: File 
receive OK. 
/tmp/ncftp_file:                                        44.00 B     1.13 kB/s 
Cmd: MDTM 20020221160059 ncftp_file 
550: Could not get file modification time. 
Cmd: QUIT 
221: Goodbye.