Topic "Error occurred while setting the permissions and/or timestam"

Author Message
[View user's profile]

Joined: 2013-09-17
Posts: 2
So I got the infamous error: "Upload of File 'filename' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permissions errors' option."

I'm using Visual Studio Express 2012 to compile a Visual Basic Windows Forms Application, using Using the WinSCP 5.2.4 beta portable executable and .NET assembly / COM library.

I've added the following:
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off
transferOptions.PreserveTimestamp = False
transferOptions.FilePermissions = null

The third line produces the following error: 'null' is not declared. 'Null' constant is no longer supported; use 'System.DBNull' instead

Recommendation: Replace 'Null' with 'DBNull.Value'.

When I make this recommended change, I get the following error: "Value of type 'System.DBNull' cannot be converted to 'WinSCP.FilePermissions'.

I tried various options, like vbNull, vbNullString, vbNullChar, "", and 0 - none of which can be converted to 'WinSCP.FilePermissions'.

I am able to use the GUI version, and successfully upload with the following settings:

"Set permissions" was already unchecked
Unchecked "Preserve timestamp"
Set "Enable transfer resume/transfer to temporary filename for" to Disable

I've also tried
session.DefaultConfiguration = False and session.IniFilePath with a working .ini file, and still get the same error in Visual Studio.

Does anyone know how to set a null value for transferOptions.FilePermissions in (that won't produce an error), or know of anything else I can try to get it working with the .ini file?


I've already reviewed: and - and neither has helped unfortunately.
[View user's profile]

Joined: 2013-09-17
Posts: 2
Setting transferOptions.FilePermissions to "Nothing" instead of "null" seems to work in

transferOptions.ResumeSupport.State = TransferResumeSupportState.Off
transferOptions.FilePermissions = Nothing
transferOptions.PreserveTimestamp = False
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26889
Location: Prague, Czechia
I do not know VB.NET, but isn't it Nothing, not Null?

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License