Operating System - HP-UX
1827313 Members
3103 Online
109961 Solutions
New Discussion

FTP Default file mode of ascii

 
SOLVED
Go to solution
Dave La Mar
Honored Contributor

FTP Default file mode of ascii

This is embarassing, but I am stumped. In every piece of HP documentation I have found it has clearly stated that the default file mode for ftp is ascii.
In each of our HP-UX 11.0 boxes we see an ftp session default to binary.
I have yet to find any documentation to show how to change default to ascii.

I have been here since the initial installation of each of our boxes. Thus, I can emphatically state that no changes were made to make the default binary.

Of course, by habit, we code I or A for any of our scripted ftp jobs depending upon the requirement.

1. Since all documentation points to ascii as the default, does anyone know why we are seeing binary as the default.

2. What, if any, rquirement would be needed to change the default to ascii.

I should note:
A. This is the native ftp that comes with HP-UX.
B. We have no interest in changing to another ftp process to overcome this issue.
c. I am simply curious as to why this appears as it does.

Thanks for all relevent input.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: FTP Default file mode of ascii

This is actually set at the time of login by the client. You need to use the -c and -n options with the ftp client so the the SYST and TYPE commands and not sent. Read the ftp man pages more carefully. While ASCII is the default, if similar systems are detected (via the SYST query), the TYPE automaically switches to the more efficient BINARY mode.

You have already shown the prudent approach; assume nothing and always assert the TYPE.
If it ain't broke, I can fix that.
Dave La Mar
Honored Contributor

Re: FTP Default file mode of ascii

Much thanks A. Clay.
Yes, one would be of bad programming habits to not set the mode.
I am happy this is not just another case of senility.

Thanks again.

Best regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."