{"action":"created","issue":{"url":"https://api.github.com/repos/Atinux/node-ftps/issues/39","repository_url":"https://api.github.com/repos/Atinux/node-ftps","labels_url":"https://api.github.com/repos/Atinux/node-ftps/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/Atinux/node-ftps/issues/39/comments","events_url":"https://api.github.com/repos/Atinux/node-ftps/issues/39/events","html_url":"https://github.com/Atinux/node-ftps/issues/39","id":194002478,"number":39,"title":"Cannot get file list from ftp using ls()","user":{"login":"neeraj87","id":7267014,"avatar_url":"https://avatars.githubusercontent.com/u/7267014?v=3","gravatar_id":"","url":"https://api.github.com/users/neeraj87","html_url":"https://github.com/neeraj87","followers_url":"https://api.github.com/users/neeraj87/followers","following_url":"https://api.github.com/users/neeraj87/following{/other_user}","gists_url":"https://api.github.com/users/neeraj87/gists{/gist_id}","starred_url":"https://api.github.com/users/neeraj87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neeraj87/subscriptions","organizations_url":"https://api.github.com/users/neeraj87/orgs","repos_url":"https://api.github.com/users/neeraj87/repos","events_url":"https://api.github.com/users/neeraj87/events{/privacy}","received_events_url":"https://api.github.com/users/neeraj87/received_events","type":"User","site_admin":false},"labels":[{"id":30009927,"url":"https://api.github.com/repos/Atinux/node-ftps/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-07T09:47:14Z","updated_at":"2016-12-10T09:48:27Z","closed_at":null,"body":"I have FTP server which has a folder with a bunch of images in it. I do not know the image names. I want to access all the image files from that FTP folder and read them as base64 format one by one, so I can upload them to some other destination. I am trying to get the list of files in the ftp using the ls() method but run into the error below.\n\n```js\nvar ftps = new FTPS({\n\t\thost: 'ftp://mydomain.com/', // required\n\t\tusername: 'username', // required\n\t\tpassword: 'password', // required\n\t\tprotocol: 'ftp', // optional, values : 'ftp', 'sftp', 'ftps',... default is 'ftp'\n\t\t// protocol is added on beginning of host, ex : sftp://domain.com in this case\n\t\tport: 22, // optional\n\t\t// port is added to the end of the host, ex: sftp://domain.com:22 in this case\n\t\tescape: true, // optional, used for escaping shell characters (space, $, etc.), default: true\n\t\tretries: 2, // Optional, defaults to 1 (1 = no retries, 0 = unlimited retries)\n\t\ttimeout: 10,\n\t\trequiresPassword: true, // Optional, defaults to true\n\t\tautoConfirm: true, // Optional, is used to auto confirm ssl questions on sftp or fish protocols, defaults to false\n\t\tcwd: '' // Optional, defaults to the directory from where the script is executed\n\t});\n\n\tftps.ls().exec(function(err, res){\n\t\tif(err || res.error){\n\t\t\tconsole.log('-------- error');\n\t\t\treturn console.log('Error getting file list:', (err || res.error));\n\t\t}\n\t\tconsole.log('------- response: ' + res);\n\t});\n```\n\nI get the following error:\n\nError getting file list: { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }"},"comment":{"url":"https://api.github.com/repos/Atinux/node-ftps/issues/comments/266193848","html_url":"https://github.com/Atinux/node-ftps/issues/39#issuecomment-266193848","issue_url":"https://api.github.com/repos/Atinux/node-ftps/issues/39","id":266193848,"user":{"login":"Atinux","id":904724,"avatar_url":"https://avatars.githubusercontent.com/u/904724?v=3","gravatar_id":"","url":"https://api.github.com/users/Atinux","html_url":"https://github.com/Atinux","followers_url":"https://api.github.com/users/Atinux/followers","following_url":"https://api.github.com/users/Atinux/following{/other_user}","gists_url":"https://api.github.com/users/Atinux/gists{/gist_id}","starred_url":"https://api.github.com/users/Atinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atinux/subscriptions","organizations_url":"https://api.github.com/users/Atinux/orgs","repos_url":"https://api.github.com/users/Atinux/repos","events_url":"https://api.github.com/users/Atinux/events{/privacy}","received_events_url":"https://api.github.com/users/Atinux/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T09:48:27Z","updated_at":"2016-12-10T09:48:27Z","body":"So this is definitely an error from your SSL certificate on your server, not from `node-ftps`"}}
{"actor":{"display_login":"Atinux"}}