Skip to content

Connect directly into specified remote directory #283

@emrealparslan93

Description

@emrealparslan93

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions