FilePermission
Hi,
I am using the following code to upload a file:
But files Permission are not set. What am I doing wrong. I got the same result if I remove the FilePermissions part.
Is there a way to set them correctly. I am using the WinSCP 5.1.7 of winscp and the .NET assembly
I am using the following code to upload a file:
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
FilePermissions fp = new FilePermissions();
fp.GroupExecute = true;
transferOptions.FilePermissions = fp;
TransferOperationResult transferResult;
transferResult = session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions);
// Throw on any error
transferResult.Check();
// Print results
foreach (TransferEventArgs transfer in transferResult.Transfers)
{
Console.WriteLine("Upload of {0} succeeded", transfer.FileName);
}
}Is there a way to set them correctly. I am using the WinSCP 5.1.7 of winscp and the .NET assembly