Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Additional details

Thanks for your detailed report.

Perhogan wrote:

The log does not show any errors i can detect in any of the conditions. as the operation is executed i found a workaround but correcting the bug might be helpful.

What log do you mean? The session log (Session.SessionLogPath) or debug log (Session.DebugLogPath)? If you haven't tried the debug log file, please do and post it here (or email to me).
Perhogan

Additional details

from a more detailed sebugging:

    1) remote file/folder does not exist
      a) I set permissions (no matter the value)
      myTransferOptions.FilePermissions = myFilePermissions

        i. I transfer a file: everything works properly

        ii. I transfer a folder: remote folder and subfiles are created with the e right permissions but i get the error from assembly

      b) I don't set permissions: everything works as expected

    2) remote file/folder exist
      a) I set permissions (no matter the value)
        i. I transfer a file: everything works properly

        ii. I transfer a folder: remote folder is not updated (permissions are not updated with the new value but the files contained in it are properly set)

      b) I don't set permissions: everything works as expected and permissions are updated


The log does not show any errors i can detect in any of the conditions. as the operation is executed i found a workaround but correcting the bug might be helpful.

Any help is appreciated
Perhogan

Creating remote folder error with permissions

I need to create a remote folder on a sftp server and i use the workaround of creating it empty locally then "putFile" it to the server.

this works fine if i'm not specifying any permission, but it fails with the error -2146233079 operation is not valid due to the current status of the object. interesting enough it works with the normal files permissions.

here the code i use to assign permissions.

myFilePermissions.Text = "rwxrwxrwx"

myTransferOptions.FilePermissions = myFilePermissions
myTransferOptionsFolder.FilePermissions = myFilePermissions
   
myTransferOptionsFolder.TransferMode = TransferMode_Binary
myTransferOptions.TransferMode = TransferMode_Binary


Set transferResult = mySession.PutFiles(SourceFolder , RemoteFolder , False, myTransferOptionsFolder)
Set transferResult = mySession.PutFiles(SourceFolder & "/" & FileName , RemoteFolder , False, myTransferOptions)


if i comment the line number 3 everything works.

(i'm using VBA)