Subject: [Q]: Default transfer mode/auto-sense of remote host type...

From: Marcus Eric Harris <[email-masked]>
Date: Wed, 11 Jun 1997 14:38:32 -0400 (EDT)

Hello, everyone!

I was hoping to get some assistance with a configuration question.

I want to find out how to get the beta-13 version of the wuftpd software
to do two things upon a successful login:

    . Automatically set the file transfer mode to 'binary'
    . Automatically sense the system type of the remote host the user
      logs in from

For example, I'm sure many of us are used to these types of messages sent
by the FTP server after logging into a remote host:

	[...]
	230  Guest login ok, access restrictions apply.
	Remote system type is UNIX.
	Using binary mode to transfer files.
	ftp>

How can I get the software to perform these auto-sensing activities?

Any help is greatly appreciated!

Regards,

Marcus E. Harris

--- 
Marcus E. Harris                   Software Developer/Process Engineer
Lucent Technologies -- Bell Labs   Work Phone:  919.380.4555
2000 Regency Park                  Facsimile :  919.380.4640
Suite #500                         E-Mail: [email-masked] (or)
Cary, North Carolina 27511                 [email-masked]
---------------------------------------------------------------------------
"Out the 10Base-T, through the router, down the T-1, over the leased line,
 off the bridge, past the firewall ... nothin' but Net."

---

From: Minsung Kim <[email-masked]>
Date: Wed, 11 Jun 1997 12:52:48 -0700

> Any help is greatly appreciated!

  I suppose there's some prevailing confusion about the "Remote
system" concept.  Put simply, those two lines ("Remote..." and
"Using...") of message is generated by the FTP client, not by the
server.

  On a successful login, indicated by the message "230 Guest
login ok..." received from the server, a client sends a SYST
command and tries to figure out what the remote system (i.e. the
server) is like. If it happens to be a UNIX system, then the
client sends "TYPE I" command to establish a binary transfer
mode, as if the user had typed a "binary" command.

  You can see this behavior using the debug mode of FTP clients,
usually turned on by -d command line option, or "debug" client
command.  (Debugging mode displays what commands -- as defined in
the FTP standard -- are sent to the remote server.)

  One simple rule to distinguish between messages generated by
the server and by the client is to check if there's a 3-digit
result code at the beginning of the message.  For instance, "230
Guest login ok..." is the message generated by the server,
whereas "Remote system type is..." is the message generated by
the client.  This rule works on most text-based ftp clients
provided by a UNIX platform.

-- 
Stair

PS.
  Reading the standard documents and understanding what is being
done underwater is fairly important. I always recommend these
practices to those who are serious about their task and those who
want to be kind of "versatile".  It may take some time at first,
but eventually makes a great deal of useful knowledge that become
a critical aid in many practical situations.
  Read them when you can.  They do help.  :-)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Kim, Minsung (Stair in Cyberland)      <mailto:[email-masked]>