You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lftp command line works, except ftps.get returns permission denied
var FTPS = require('ftps');
this.client = new FTPS({
host: 'IP_ADDRESS', // required
username: 'USERNAME', // Optional. Use empty username for anonymous access.
password: 'PASSWORD', // Required if username is not empty, except when requiresPassword: false
protocol: 'ftp', // Optional, values : 'ftp', 'sftp', 'ftps', ... default: 'ftp'
// protocol is added on beginning of host, ex : sftp://domain.com in this case
port: 21, // Optional
// port is added to the end of the host, ex: sftp://domain.com:22 in this case
escape: true, // optional, used for escaping shell characters (space, $, etc.), default: true
retries: 2, // Optional, defaults to 1 (1 = no retries, 0 = unlimited retries)
timeout: 10, // Optional, Time before failing a connection attempt. Defaults to 10
retryInterval: 5, // Optional, Time in seconds between attempts. Defaults to 5
retryMultiplier: 1, // Optional, Multiplier by which retryInterval is multiplied each time new attempt fails. Defaults to 1
requiresPassword: true, // Optional, defaults to true
autoConfirm: true, // Optional, is used to auto confirm ssl questions on sftp or fish protocols, defaults to false
cwd: '', // Optional, defaults to the directory from where the script is executed
additionalLftpCommands: 'set xfer:clobber on', // Additional commands to pass to lftp, splitted by ';'
// requireSSHKey: true, // Optional, defaults to false, This option for SFTP Protocol with ssh key authentication
// sshKeyPath: '/home1/phrasee/id_dsa' // Required if requireSSHKey: true , defaults to empty string, This option for SFTP Protocol with ssh key authentication
});
var self = this;
// Do some amazing things
this.client.get('/test.txt').exec((err, resp) => {
console.log(resp);
});
resp returns permission denied, can u please look in to it?
thanks in advance.
The text was updated successfully, but these errors were encountered:
Hello.
can you improve the formatting of your issue ?
"permission denied" means that the server refused to give you the permission.
It is going to be hard to debug for you without access to the server. You can maybe print by addings logs in the code the complete set of params that ftps is sending to the server.
Actually i found the issue and i wasn't able to resolve it, spawning the process doesn't give permissions to write files for that process, for example: if i list ftp directories using spawn, it works but not put or get file, permission denied is thrown, unless i run node as root, which works for files, however this is not an option, please note that my currrent nodejs can read and write but not spawn('lftp'), it fails with permission denied.
lftp command line works, except ftps.get returns permission denied
var FTPS = require('ftps');
this.client = new FTPS({
host: 'IP_ADDRESS', // required
username: 'USERNAME', // Optional. Use empty username for anonymous access.
password: 'PASSWORD', // Required if username is not empty, except when requiresPassword: false
protocol: 'ftp', // Optional, values : 'ftp', 'sftp', 'ftps', ... default: 'ftp'
// protocol is added on beginning of host, ex : sftp://domain.com in this case
port: 21, // Optional
// port is added to the end of the host, ex: sftp://domain.com:22 in this case
escape: true, // optional, used for escaping shell characters (space, $, etc.), default: true
retries: 2, // Optional, defaults to 1 (1 = no retries, 0 = unlimited retries)
timeout: 10, // Optional, Time before failing a connection attempt. Defaults to 10
retryInterval: 5, // Optional, Time in seconds between attempts. Defaults to 5
retryMultiplier: 1, // Optional, Multiplier by which retryInterval is multiplied each time new attempt fails. Defaults to 1
requiresPassword: true, // Optional, defaults to true
autoConfirm: true, // Optional, is used to auto confirm ssl questions on sftp or fish protocols, defaults to false
cwd: '', // Optional, defaults to the directory from where the script is executed
additionalLftpCommands: 'set xfer:clobber on', // Additional commands to pass to lftp, splitted by ';'
// requireSSHKey: true, // Optional, defaults to false, This option for SFTP Protocol with ssh key authentication
// sshKeyPath: '/home1/phrasee/id_dsa' // Required if requireSSHKey: true , defaults to empty string, This option for SFTP Protocol with ssh key authentication
});
var self = this;
// Do some amazing things
this.client.get('/test.txt').exec((err, resp) => {
console.log(resp);
});
resp returns permission denied, can u please look in to it?
thanks in advance.
The text was updated successfully, but these errors were encountered: