West Wind Internet and Client Tools
sftp upload error
Gravatar is a globally recognized avatar based on your email address. sftp upload error
  Robert
  All
  Dec 18, 2019 @ 03:43pm

Hello, I am trying to use the sftp tools to upload a file using SFTP. using the same credentials I can upload a file using Filezilla. However, using wwSFTP I get an access denied. Note, I CAN connect and I CAN change directory via FtpSetDirectory, and I CAN get a list of files on the site via FtpListFiles. However, FtpSendFileEx fails with an -1 - Permission Denied. I am using client Tools v6.1

Sample:

loFtp = CREATEOBJECT("wwSftp")
loFtp.cFtpServer = lcFTPURL
loFtp.nFtpPort = 22
loFtp.cusername = lcFTPuser
loFtp.cPassword = lcFTPpwd
loFtp.ftpConnect() &&sucess
loFtp.FtpSetDirectory('inventory-files') &&success
loFiles = loFtp.FtpListFiles("")  &&success
FOR EACH loFile IN loFiles FOXOBJECT
  ? loFile.Name
ENDFOR
lnResult = loFtp.FtpSendFileEx(paramFileName,paramFileName)  &&fail. Permission denied.

Since I can upload via Filezilla using the same credentials I suspect I may be missing some setting in wwSFTP?

Am I eligible to upgrade to West Wind Client Tools 7? Would this make a difference?

Best regards and thank you! Robert.

Gravatar is a globally recognized avatar based on your email address. re: sftp upload error
  Rick Strahl
  Robert
  Dec 19, 2019 @ 01:05pm

Make sure your path name is correct for the upload. My guess is that you're perhaps not providing the path correctly. It should be in the form of:

relativeFolder/filename.ext or /root/folder/filename.ext.

Also if you're using relative folders, make sure you're in the folder you're expecting to be in.

+++ Rick ---

© 1996-2020