Search code examples
ruby-on-railsrubyftpchilkat

Failed to make a directory using Chilkat lib


I am using the Chilkat gem version 9.5.0.65. and When I try to create a folder using sftp credentials it return false, while when I use Net::SFTP it creates the folder.

As the chilkat library is compiled so I am unable to debug the issue. Can anyone suggest me what can be the issue.

I have tried with other library with which I am able to do. But I want to use chilkat

ftp = Chilkat::CkSFtp.new()
make ftp connection
ftp.CreateDir("/a/b")
#this is returing false

I want to know the reason behind it.


Solution

  • Try "a/b" instead of "/a/b". When you say "/a/b" you're passing an absolute path, and therefore trying to create directory "a" in the root of the hard drive. You want to create a directory relative to the HOME directory of your SSH account.