Re: issue with ftp::Quote STATUS .



On Apr 26, 11:17 pm, s...@xxxxxxxxxxxxxxxxx (Douglas Wells) wrote:
In article <1177597912.942299.215...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Patrick Finnegan <finnegan.patr...@xxxxxxxxx> writes:



Running Tcl 8.4.14 on Windows XP.

I am trying to use the ftp:Quote option to send native FTP commands to
an FTP server but it returns "command not understood".

Works from the ftp command line on tyhe same machines.

(bin) 65 % ftp::Pwd $session
/
(bin) 66 % ftp::Quote $session STATUS
500 'STATUS': command not understood.

Output from command line FTP.

ftp> status
Connected to 12.34.56.78..
Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On
Debugging: Off ; Hash mark printing: Off .

If you are going to use FTP commands directly, you really should
study the FTP protocol (RFC 959), otherwise you are operating in
the dark.

You will also find it instructive to ask your ftp command to show
you the actual protocol interactions as the ftp client is interpreting
the commands that your type. (I don't use Windows XP, but the
command is probably something like "debug".) In this particular
case, you will find that the ftp client is almost certainly simply
reporting to you its current state based on its local information.
There is probably *no* FTP command transmitted whatsoever (for
this particular client command).

There is an FTP 'STAT' command, but I don't know if it does what
you want as it's not clear what you are really trying to do.

Also, in response to another suggestion in this thread, the case
of the command does not matter. FTP, as most Internet protocols,
is case insensitive. (Thus, you could use STAT, stat, Stat, or
even sTaT over the wire.)

- dmw

--
. Douglas Wells . Connection Technologies .
. Internet: -sp9804- -at - contek.com- .

Thanks for all of your replies. I got it working for some commands.

package require ftp

set ftp::VERBOSE 1

set ftp::DEBUG 1

set session [ ftp::Open $host $logon $password -output ftpOut ]

puts "\ndir list\n"

foreach i [ ::ftp::NList $session * ] {

puts $i

}

puts "\n"

###############################
puts "check pwd"
catch { ftp::Quote $session pwd } r
puts "result is $r "
##############################

puts "\n"

###############################
puts "change users"
catch { ftp::Quote $session user $logon2 $password2 } r
puts "result is $r "
###############################

puts "\ndir list\n"
foreach i [ ::ftp::NList $session * ] {

puts $i

}

puts "\n"

::ftp::Close $session


.



Relevant Pages

  • Re: FTP PUT with Store Unique
    ... years ago but had totally forgotten - I appreciated that the STOU command is ... covers the point I want to make which is that the FTP client commands are ... An SUNIQUE command compatible ...
    (bit.listserv.ibm-main)
  • Re: FTP PUT with Store Unique
    ... The best list for topics related to the Communications Server IP ... command or vice versa. ... Instructs the FTP client not to include a name with the STOU ... -- If NONAME is in effect, no name string specifying a foreign_file value follows ...
    (bit.listserv.ibm-main)
  • Re: FTP PUT with Store Unique
    ... a date/time stamp into the name before the FTP step. ... I foolishly assumed when I saw the SUnique parameter that - of course! ... command or vice versa. ... -- If NAME is in effect, the name string specifying a foreign_file value ...
    (bit.listserv.ibm-main)
  • Re: Problem about Window Xp SP2 firewall and the buildin FTP command
    ... I copy your example ftp command file to a.txt saved in C:\dell folder. ... I cannot turn off Windows Firewall, since it is controlled by Domain ...
    (microsoft.public.windowsxp.general)
  • [NT] Multiple Vulnerabilities Found in PlatinumFTPserver
    ... A vulnerability in the product allows remote attackers to cause the server ... to traverse into directories that reside outside the bounding FTP root ... delete files and perform a DoS attack on the server. ... 200 PORT command successful ...
    (Securiteam)