General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change ftp transfer complete message.

SOLVED
Go to solution
Pulse001
Regular Advisor

How to change ftp transfer complete message.

Hello,

I am facing a peculiar request from one of my users. They want to modify the message we receive on successful transfer of files via ftp. The change required is as below : --

Present Description: 226 Transfer complete.
Required Description: 226 File receive OK.

Is it possible to change this message ? I believe this message is generated by the ftp program and hence will not be very easy to implement, but just in case anybody has come across a similar request.
8 REPLIES
Mel Burslan
Honored Contributor
Solution

Re: How to change ftp transfer complete message.

I do not believe you can do this short of recompiling the ftp client binary with this changed message string. And I am not even sure you can find the source code for the ftp client coming with hpux.
________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor

Re: How to change ftp transfer complete message.

Shalom,

Yes you can change it. You need to start with an open source ftp package and compile it.

However that means you have to maintain the code and put in security fixes as they come out.

Is it worth it?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: How to change ftp transfer complete message.

Hi:

Why would you want to do this? The important piece of the result is the three-digit number at the beginning of the message; here the '226'. What happens if you transfer a directory listing? I suspect that the successful response is '226'. I suggest a bit of user education.

Regards!

...JRF...
curt larson_1
Honored Contributor

Re: How to change ftp transfer complete message.

there might be a possibility with the LANGUAGE settings. i.e. your LANG variable settings can change what is output by various programs. ftp is one of them. Don't know if you can change this particular one.

Look at where the LANG stuff is stored for ftp.
You'll have to get your users set there LANG variable in their shell. that would probably be 'C'. and being your changing stuff that is considered to be 'owned' by the OS manufacture, they are free to undue your changes, or make changes as they wish. Therefore, patches, upgrades, new os, etc are likely to undue your changes
Dennis Handly
Acclaimed Contributor

Re: How to change ftp transfer complete message.

>Is it possible to change this message?

Is there a ftp.cat that you can modify?
Pulse001
Regular Advisor

Re: How to change ftp transfer complete message.


Thanks everybody i educated the user to utilize the three digit number 226 in her application code. Now she has made these changes and deployed the code successfully.
Dennis Handly
Acclaimed Contributor

Re: How to change ftp transfer complete message.

>ME: Is there a ftp.cat that you can modify?

I didn't find one.
Viktor Balogh
Honored Contributor

Re: How to change ftp transfer complete message.

or perhaps you could write a wrapper for ftp, and just simply 'sed' the output of it. so they wouldn't notice the 'transfer complete' message, instead of it they would see the 'file receive OK' message. - OK I now, no points will be awarded for this :)
****
Unix operates with beer.