Topic "unable to upload"

Author Message
rvergin

Guest


I am unable to upload a file. The error message the upload was successful but error occurred while setting the permissions and/or timestamp. I set preservetimestamp to false. I am using vb.net. I still get the error. I don't see where I can turn off permissions.
Advertisements
revergin
[View user's profile]

Joined: 2017-09-08
Posts: 2
Location: Southfield, MI
vendor states they require SSH2. Is that a problem for WinSCP? or a contributing factor to this problem?
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26705
Location: Prague, Czechia
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
rvergin

Guest


martin wrote:
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.


Here is my code. I am unable to find the log file.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
' Setup session options
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = "host"
.UserName = "user"
.Password = "pass"
.PortNumber = 22


.SshHostKeyFingerprint = "ssh-rsa 2048 d5:e9:b2:29:16:a3:09:fb:e8:6d:67:72:be:88:c8:d6"
End With

Using session As New Session

session.SessionLogPath = "p:\comerica\log.xml"

' Connect
session.Open(sessionOptions)


' Upload files
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Ascii
transferOptions.PreserveTimestamp = False

Dim transferResult As TransferOperationResult
transferResult = session.PutFiles("p:\Comerica\DataVault\ACH\TPEPILOCOMOTVSFTP.EFTCLAIMS 09-06-2017 - Copy.txt", "/To_Comerica/TPEPILOCOMOTVSFTP.txt")
'https://sftp.comerica.com/?token=20079AB7-94AE-11e7-80E2-42F2E966EE8F#/To_Comerica/

' Throw on any error
transferResult.Check()

' Print results
For Each transfer In transferResult.Transfers
Debug.Print("Upload of {0} succeeded", transfer.FileName)
Next
End Using

'Return 0
Catch 'e As Exception
Console.WriteLine("Error: {0}", e)
'Return 1
End Try


End Sub
rvergin

Guest


rvergin wrote:
martin wrote:
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.


Here is my code. I am unable to find the log file.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
' Setup session options
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = "host"
.UserName = "user"
.Password = "pass"
.PortNumber = 22


.SshHostKeyFingerprint = "ssh-rsa 2048 d5:e9:b2:29:16:a3:09:fb:e8:6d:67:72:be:88:c8:d6"
End With

Using session As New Session

session.SessionLogPath = "p:\comerica\log.xml"

' Connect
session.Open(sessionOptions)


' Upload files
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Ascii
transferOptions.PreserveTimestamp = False

Dim transferResult As TransferOperationResult
transferResult = session.PutFiles("p:\Comerica\DataVault\ACH\TPEPILOCOMOTVSFTP.EFTCLAIMS 09-06-2017 - Copy.txt", "/To_Comerica/TPEPILOCOMOTVSFTP.txt")
'https://sftp.comerica.com/?token=20079AB7-94AE-11e7-80E2-42F2E966EE8F#/To_Comerica/

' Throw on any error
transferResult.Check()

' Print results
For Each transfer In transferResult.Transfers
Debug.Print("Upload of {0} succeeded", transfer.FileName)
Next
End Using

'Return 0
Catch 'e As Exception
Console.WriteLine("Error: {0}", e)
'Return 1
End Try


End Sub


Vendor states that the error may be du to the fact that the file I am uploading is in a polled folder and is almost immediately moved to a production error. It may be happening before the WinSCP upload process has time to set the permissions on the file. How do I turn the setting of permissions off?
Guest




rvergin wrote:
I am unable to upload a file. The error message the upload was successful but error occurred while setting the permissions and/or timestamp. I set preservetimestamp to false. I am using vb.net. I still get the error. I don't see where I can turn off permissions.


Day 2

Any body know how to turn off permission settings on a file upload?
Guest




Anonymous wrote:
rvergin wrote:
I am unable to upload a file. The error message the upload was successful but error occurred while setting the permissions and/or timestamp. I set preservetimestamp to false. I am using vb.net. I still get the error. I don't see where I can turn off permissions.


Day 2

Any body know how to turn off permission settings on a file upload?


still day 2 actually 6

set transferoptions.filepermissions = nothing

still get error.

Now do Any body know how to set the ignore errors ?
revergin
[View user's profile]

Joined: 2017-09-08
Posts: 2
Location: Southfield, MI
rvergin wrote:
I am unable to upload a file. The error message the upload was successful but error occurred while setting the permissions and/or timestamp. I set preservetimestamp to false. I am using vb.net. I still get the error. I don't see where I can turn off permissions.


end of day 2 (6)

No response yet. I have fixed my problem. I still don't know where the log file is.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26705
Location: Prague, Czechia
So do you still need any help?

Instructions for obtaining the session log is in my previous reply.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License