Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTPS on tls, using port 990 #153

Open
mybeez opened this issue Jun 28, 2016 · 7 comments
Open

FTPS on tls, using port 990 #153

mybeez opened this issue Jun 28, 2016 · 7 comments

Comments

@mybeez
Copy link

mybeez commented Jun 28, 2016

Hello,

I'm trying to connect using the implicit secure option with port 990.
Here my configuration:

_connectionProperties.secure = true;

 _connectionProperties.secureOptions = {

    'rejectUnauthorized': false

 };

I've tried with with option 'implicit' but it don't works. Nothing happens.
Is-it possible to use implicit over TLS with node-ftp ?

Thanks !

@tinydogio-joshua
Copy link

Were you able to get an answer to this or figure it out? I am having a similar issue.

@aredfox aredfox mentioned this issue Jan 31, 2017
@aredfox
Copy link

aredfox commented Jan 31, 2017

True - same issues here. I also haven't found any docs on the secureOptions object we can set - or is there docs that I haven't found yet?

@aredfox
Copy link

aredfox commented Jan 31, 2017

@Gander7
Copy link

Gander7 commented May 9, 2017

EDIT: Still an issue in master, fixed in next comment

Anyone find a solution?
If I use secure:true, it will finish the onconnect function, do nothing for a few minutes, emit end, and then emit close(had_err = false). It will never emit ready. Function reentry which emits ready is never run.
If I use secure: implicit, then I get a timeout while connecting to server.

@Gander7
Copy link

Gander7 commented May 9, 2017

I used the connection.js file from kellym's fork (as suggested on reedit here) and it was able to emit a ready state with an error.

@Gander7
Copy link

Gander7 commented May 10, 2017

My issue was port 990 and using secure: implicit (implicit FTP over TLS). You can change it and use FTPES(explicit FTP over TLS) without reconfiguration of your ftp server.
The trick is to use port 21 for FTPES with secure: true and options below.
secure: true cannot work with port 990 at this point in time.
secure: implicit with port 990 does not work and even kellym's fork throws a protection level error for me.

Working Code:

var Client = require('ftp')
var fs = require('fs')

var c = new Client();
let file = fs.createReadStream(path + filename)
c.on('ready', () => {
  c.put(path + filename,
        '/destination/' + filename, (err) => {
          if (err) throw err;
          c.end()
        })
  })
})

c.connect({
  host: '999.999.999.999',
  user: 'user',
  port: 21,
  password: 'pass',
  secure: true,
  secureOptions: { rejectUnauthorized: false }
});

@diegodubon
Copy link

Nice Gander7 it works for me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants