DOS FTP script does not work

DOS FTP access script

I am using this command:
ftp -s:ftp.txt
ftp.txt is this:
open 000.000.000.000
MyUser
MyPassword
lcd c:\_A
put TR.bak
quit

I get this response:
ftp> Connected to 000.000.000.000.
open 000.000.000.000
220 Microsoft FTP Service
User (000.000.000.000:(none)):
331 Password required for MyUser.

530 User MyUser cannot log in.
ftp> Local directory now C:\_A.
ftp> lcd c:\_A
put TR.bak
530 Please login with USER and PASS.
530 Please login with USER and PASS.
ftp> quit
221  

the password is correct. What am I doing wrong here?
LVL 2
hgj1357Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Martin MillerCTOCommented:
Can you confirm manually your steps work ?
0
hgj1357Author Commented:
Ok. That's odd. Password is correct. 530 user MyUser cannot log in
0
Bill PrewCommented:
Is MyUser set up as a valid FTP client user account on the FTP server you are connecting to?  (it doesn't seem to be...)


»bp
0
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

hgj1357Author Commented:
Yeah. It is.  I can access from a web browser with those credentials.  I'm trying to use a cmd script to automate uploads.
0
Bill PrewCommented:
You might try toggling verbose mode on with the verbose command and see what additional info it provides about the user id rejection.

Could the webserver be doing something different with the FTP request from a browser (port 80) compared to what the O/S FTP server is doing with incoming port 21 requests?  Is the browser session HTTP or HTTPS?

Check any FTP server logs on the host for any clues also.


»bp
0
hgj1357Author Commented:
80 vs 21   I bet that is it.
0
hgj1357Author Commented:
21 is open for FTP on both ends.
0
Bill PrewCommented:
But does the FTP server listening on port 21 on the host have that user and password defined?


»bp
0
hgj1357Author Commented:
Yes, it does.
0
Bill PrewCommented:
Well, if you can't log in with that user doing it interactively at the command prompt not sure I can help with that much, it's an authentication problem of some sort.

Did you try verbose mode?

Did you check host FTP server logs?


»bp
0

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
hgj1357Author Commented:
Yeah.  FTP server is cerberus.  

Aaah.  Yes.  It would help if I turned on FTP on 21 on the cerberus, wouldn't it.
0
hgj1357Author Commented:
I had 21 open on the FTP server, but cerberus itself was listening for HTTPS not std ftp on 21
0
Bill PrewCommented:
Great, glad you got that sorted out, pesky computers :-).


»bp
0
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
FTP

From novice to tech pro — start learning today.