LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ftp server CWD error (https://www.linuxquestions.org/questions/linux-software-2/ftp-server-cwd-error-404425/)

rsdunker 01-17-2006 07:44 AM

ftp server CWD error
 
I keep getting a "invalid command" when attempting to CWD on my ftp server. I have tried both vsftpd and proftpd and get same results. I am running SuSE 10.0. I have installed and used proftpd several times in the past without this problem and have finally run out of ideas. Thanks for any help.

nx5000 01-17-2006 09:58 AM

Are you sure the problem is not due to the client? Like a winblows client?
If yo have access to the FTP command QUOTE, then send a direct command to the server to be sure that it does not come from the client
Code:

220 not.your.business.com FTP server (Version 6.5/OpenBSD, linux port 0.3.2) ready.
Name (not.your.business.com:nx): nx
331 Password required for nx.
Password:
230 User nx logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quote cwd
250 CWD command successful.
ftp> quit

edit: I remembered I had a proftpd running on my own machine.

Code:

nx@Debian:~$ ftp localhost
Connected to localhost.localdomain.
220 ProFTPD 1.2.10 Server (Debian) [127.0.0.1]
Name (localhost:nx): nx
331 Password required for nx.
Password:
230 User nx logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> CWD
?Invalid command
ftp> help
Commands may be abbreviated.  Commands are:

!              debug          mdir            qc              send
$              dir            mget            sendport        site
account        disconnect      mkdir          put            size
append          exit            mls            pwd            status
ascii          form            mode            quit            struct
bell            get            modtime        quote          system
binary          glob            mput            recv            sunique
bye            hash            newer          reget          tenex
case            help            nmap            rstatus        tick
cd              idle            nlist          rhelp          trace
cdup            image          ntrans          rename          type
chmod          lcd            open            reset          user
close          ls              prompt          restart        umask
cr              macdef          passive        rmdir          verbose
delete          mdelete        proxy          runique        ?
ftp> rhelp
214-The following commands are recognized (* =>'s unimplemented):
214-CWD    XCWD    CDUP    XCUP    SMNT*  QUIT    PORT    PASV
214-EPRT    EPSV    ALLO*  RNFR    RNTO    DELE    MDTM    RMD
214-XRMD    MKD    XMKD    PWD    XPWD    SIZE    SYST    HELP
214-NOOP    FEAT    OPTS    AUTH    CCC*    CONF*  ENC*    MIC*
214-PBSZ    PROT    TYPE    STRU    MODE    RETR    STOR    STOU
214-APPE    REST    ABOR    USER    PASS    ACCT*  REIN*  LIST
214 Direct comments to root@localhost.localdomain
ftp> quote CWD ~root
250 CWD command successful
ftp> cd ~root
250 CWD command successful
ftp> bye
221 Goodbye.

Using "help" you see that linux ftp does not know CWD but knows CD (which is translated as CWD ftp-command)
Using "rhelp" , which sends list of known command by the server, you see that it understands ftp-command CWD
Forcing a command to be sent to the server with quote , it works.

So you should use cd


All times are GMT -5. The time now is 04:12 PM.