Error occurred while setting the permissions and/or timestamp

Advertisement

warbick
Joined:
Posts:
2

Error occurred while setting the permissions and/or timestamp

I've been running a powershell script daily for about a year against an external FTP server and it has worked fine. Suddenly it stopped working. The script uploads one file and stops on this error:

Upload of file 'file.xml' was successful, but error occurred while setting the permissions and/or timestamp.

If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
No such file or directory.
Error code: 2
Error message from server (en-US): No such file
I've searched around and people say to turn on ignore permission errors. However I can't seem to find exactly how to do that since I'm doing the .net assembly way of doing this script. I found transfer options and input them like so:
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.FilePermissions = $Null
$transferOptions.PreserveTimestamp = $False
$session.PutFiles($item, $remotePath, $transferOptions).Check()
But it seems to have no effect. I'm not sure if I'm doing the transfer options correctly, and I'm not sure if I'm even using the correct transfer option. Can anyone help?

Reply with quote

Advertisement

milton
Guest

Re: Error occurred while setting the permissions and/or timestamp

I've the same error using WinSCP. this error occurred only i upload zip folders from specific path. While moving Zip folders from other directory or any other files types am not getting this error. What should i do now? is there a problem with the zip folder or the directory?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
34,883
Location:
Prague, Czechia

Re: Error occurred while setting the permissions and/or timestamp

milton wrote:

I've the same error using WinSCP. this error occurred only i upload zip folders from specific path. While moving Zip folders from other directory or any other files types am not getting this error. What should i do now? is there a problem with the zip folder or the directory?
This does not really look like related to this topic. Please start a new topic and post a complete session log file.

Reply with quote

Advertisement

You can post new topics in this forum