I solved by myself. Sysadmin change the permission to the group, the user didn't have read permission!
- ugaciaka
Cannot open remote file 'myfile.exe'.
Permission denied.
Error code: 3
Error message from server: Permission denied
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
var transferResult =
session.GetFiles(SftpPath, $"{UploadToLocalPath}\\", RemoveRemoteFiles, transferOptions);
if (!transferResult.IsSuccess)
{
_getFilesOutput.ExceptionMessages = transferResult.Failures.Select(e => e.Message).ToList();
_getFilesOutput.IsFailed = true;
}
_getFilesOutput.DownloadedLocalFiles.Clear();
(_getFilesOutput.DownloadedLocalFiles as List<string>)?.AddRange(transferResult.Transfers
.Select(p => p.FileName).ToList());