mscdex / node-ftp

An FTP client module for node.js
MIT License
1.13k stars 243 forks source link

Accessing FTP with only a username and no password #248

Open CodeBradley opened 5 years ago

CodeBradley commented 5 years ago

I am trying to connect to GoDaddy auctions FTP server, but I am not able to connect due to it not having a password. It looks like this.options in connect doesn't allow an empty password and changes it to anonymous by default.

this.options.password = options.password || 'anonymous@';

ftp://auctions@ftp.godaddy.com is the complete login. How do I connect to GoDaddy's FTP service?

greenfrontend commented 2 years ago

@CodeBradley these options works for me:

const options = {
  host: "ftp.godaddy.com",
  user: "auctions",
  password: new String(""),
};
Sourav-techlur commented 1 year ago

Hey @greenfrontend those options are not working it is giving following error

Error: Please login with USER and PASS. at makeError (E:\projects\domain-analysis\node_modules\ftp\lib\connection.js:1068:13) at Parser.<anonymous> (E:\projects\domain-analysis\node_modules\ftp\lib\connection.js:114:25) at Parser.emit (node:events:390:28) at Parser._write (E:\projects\domain-analysis\node_modules\ftp\lib\parser.js:59:10) at writeOrBuffer (node:internal/streams/writable:389:12) at _write (node:internal/streams/writable:330:10) at Parser.Writable.write (node:internal/streams/writable:334:10) at Socket.ondata (E:\projects\domain-analysis\node_modules\ftp\lib\connection.js:274:20) at Socket.emit (node:events:390:28) at addChunk (node:internal/streams/readable:315:12) { code: 530 }