I have an app that launches a batch file to do a ftp. I have a Check Point Firewall. We added a patch to the firewall and now one account does not work any more. When I launch the batch file I get the following:
220 Check Point FireWall-1 Secure FTP server running on (serverfirewall)
421 Service not available, remote server has closed connection

I can ftp and drop files fine manually using the account, but this now fails when launched in the application. It used to work until a patch was added. It did not effect the other accounts and I see no difference in the other accounts.

The app has a line before it that causes it to shell out of our system to Unix and run a script.
The line is "sh -c 'ftp -n < "  and then it executes the script. The lcd
command does display and then I get

*  Script *
open {address}
user {user} {pwd}
put {filename}

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is going to sound silly, but did you try editing the script file and adding adding <control-M> characters to each line?

CheckPoint firewalls will drop connections that don't have all lines ending in <newline><cariage-return>, and lines in Unix files usually end in <newline> without the <cariage-return> (control-M).

This could be the problem if the ftp client software is passing not ensuring that the lines given to it are properly formed.

And this wouldn't be a problem when running manually because the terminal driver automatically adds a <cariage-return> when you type a <newline> (the Enter key, or control-J).

Ask your firewall vendor on how to fix their firewall after patching.
I can confirm that FTP still keeps working outside your network.
murray_stevenAuthor Commented:
Got in touch with the vendor and a rule was created for the user to allow them to pass through. I am not sure about the details of why this had to be created.
PAQed with points refunded (500)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.