Operating System - OpenVMS
1753361 Members
5366 Online
108792 Solutions
New Discussion юеВ

Re: easy? DCL/FTP question

 
SOLVED
Go to solution
john ruffner
New Member

easy? DCL/FTP question

we're running OpenVMS V7.3-2
our old FTP server was not case-sensitive and this command worked:

FTP OLD-SERVER/USER=OLDUSR/PASS=oldpass

our new server is case-sensitive; this command does not work:

FTP NEW-SERVER/USER=CORP\NEWUSR/PASS=K5_9MQ$BZ

If I put the password in double quotes, it does work:

FTP NEW-SERVER/USER=CORP\NEWUSR/PASS="K5_9MQ$BZ"

I thought since the password is uppercase, it would work without the double quotes. We are hoping to avoid modifying a lot of command procedures that are not supplying the double quotes, so can anyone explain what is going on, that is, why the password is not getting sent correctly?

I don't know much about the destination server, but when i connect, i get this info (if that gives any clues):

my.company.com MultiNet FTP user process V5.1(119)
Connection opened (Assuming 8-bit connections)
[Attempting to log in as corp\newusr]

thanks in advance for any help!



12 REPLIES 12
Steven Schweda
Honored Contributor

Re: easy? DCL/FTP question

> [...] MultiNet FTP user process V5.1(119)

Sounds like a MultiNet question, where I'm
more ignorant than usual. Such things may
also depend on your SET PROCESS /PARSE_STYLE
setting.

show proc /pars

Between DCL and the C run-time details, many
things are possible.
Richard Whalen
Honored Contributor

Re: easy? DCL/FTP question

I'm sorry to report that MultiNet does not provide the option of not lowercasing the password and userstring when they are done this way.

I'll look into making it an option.
john ruffner
New Member

Re: easy? DCL/FTP question

Richard, are you saying that multinet automatically makes the password lowercase if it's not in double quotes (the opposite of what DCL does?)
Jess Goodman
Esteemed Contributor

Re: easy? DCL/FTP question

All programs that use the C argv() interface for retrieving command line arguments behave this way. The command line is lowercased by default. Uppercase command line arguments must be inside a quoted string.

You can override this default behavior with SET PROCESS/PARSE=EXTENDED and defining some logicals that change the C RTL enviroment. (I can't look them up right now).

ZIP and UNZIP from Info-Zip also behave this way. ZIP -v or ZIP -V sets verbose mode, but ZIP "-V" saves VMS file attributes.
I have one, but it's personal.
John Gillings
Honored Contributor
Solution

Re: easy? DCL/FTP question

John,

>I thought since the password is uppercase,
>it would work without the double quotes.

In "normal" DCL that would be correct, since the command interpreter upper cases all non-quoted text. However, most unix style utilities which get parameters via the C argc/argv mechanism (like ftp) do the opposite. Unquoted text is lower cased. For example, that's why you need to quote the "-V" switch on the ZIP command. Otherwise it's seen as "-v".

Prior to V7.2(?) OpenVMS usernames and passwords were strictly uppercase with a very limited set of allowed characters. As we move into later versions and authentication mechanisms, that's not necessarily true. Both usernames and passwords can be case sensitive and a larger character set allowed (including characters that have syntactic significance like space, "@", "!", etc). You'd therefore be wise to update any procedure that deals with usernames and passwords to use quoted strings.

This is just the tip of a very large iceberg which will affect a lot of DCL code - case blindness. Now that we have case sensitive file names, and interoperativity with case sensitive operating systems, like Unix and Linux, making existing DCL code work correctly can be a royal pain! If we're to survive, DCL programmers will have to think much harder about what happens to command lines as they're parsed and processed, what strings need to be converted, quoted, even double or triple quoted!
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: easy? DCL/FTP question

> ZIP and UNZIP from Info-Zip also behave
> this way. [...]

> [...] that's why you need to quote the "-V"
> switch on the ZIP command.

Hey. Watch where you're casting those
aspersions, will ya? You could hurt
someone's feelings if you're not more
careful.

ALP $ zip -v
Copyright (C) 1990-2005 Info-ZIP
Type 'zip "-L"' for software license.
This is Zip 2.31 (March 4th 2005), by Info-ZIP.
[...]

ALP $ zip -V

zip error: Invalid command arguments (cannot write zip file to terminal)

More than three years like this, you'll be
sure to have noticed. Of course, you need
this setting:

ALP $ show proc /pars
[...]
Parse Style: Extended

Modern Zip help text includes this:

(Must quote upper-case options, like "-V", unless SET PROC/PARSE=EXTEND)

The code enabling this behavior (without
fiddling with the environment) is easy to
steal from the Info-ZIP programs (although
I'd steal it from a more recent version than
this one). Normally, it's also pretty easy
to incorporate it into an application, which
is why I practically always do it. (Around
here, for example,
vim -g -R zip.c
works the way it should.)

Because _I_ can get this stuff to work
conveniently, it's a recurring source of
irritation to me that products like SSH, for
example, don't.
Richard Whalen
Honored Contributor

Re: easy? DCL/FTP question

MultiNet automatically makes the password and username lowercase whether or not they are enclosed in quotes.
Wim Van den Wyngaert
Honored Contributor

Re: easy? DCL/FTP question

May be it's easier to change the password to k5_9mq$bz (lowercase). And may be the username too.

Wim
Wim
Art Wiens
Respected Contributor

Re: easy? DCL/FTP question

Richard, I humbly ask, are you sure? We just ran into a similar situation (albeit with TCPware) and Process support was able to tell me about a logical :

define TCPWARE_FTP_LOWERCASE_USERNAME TRUE

I know TCPware and Multinet have some things in common (a lot?). Perhaps this exists?

Cheers,
Art