node-ftp
node-ftp copied to clipboard
Connect directly into specified remote directory
Hello,
I've a user that is allowed to specific directory in FTP server. While connecting to ftp server using host, port, username and password, I get the error below:
User cannot log in, home directory inaccessible. 530
I know that my user is only allowed to specific directory like /user/dir, but I do not know how to connect directly into it.
I'm sharing my code snippet below:
client.connect({
host: "xx.xxx.xx.xxx",
user: "username",
password: "pass",
secure: true,
secureOptions: {
rejectUnauthorized: false,
key: key,
cert: crt
}
});
As I know secureOptions is same with tls.connect() options and I tried to add path into secureOptions but it didn't work.
How can I connect to specific directory in remote?