Permission denied while downloading file using function DownloadFile

0
Below is the exception we are receiving from ComponentPro Exception Title => Permission denied. Exception Stacktrace => at c_bo.c_32f482aa(c_ew , Type ) at c_bo.c_e8ccc172(String , c_bq , Boolean , AsyncOperation ) at ComponentPro.Net.Sftp.c_7077e6fa(Boolean , ProgressFileItem , Stream , AsyncOperation ) at ComponentPro.IO.FileSystem.CopyToSync(ProgressFileItem currentProgressFileItem, AsyncOperation asyncOp) at ComponentPro.Net.Sftp.DownloadFile(String remotePath, Stream outputStream) at ANJU.BUS.Common.Functions.DownloadFile(String server, Int32 port, Int32 timeOut, String userName, String password, String fileTransferType, Int32 blockSize, String remotePath, String fileName, String& outputMessage) at __DynamicCode.Typeed0c2929df644c5bd67c0d27f66e32.OnExecute(PipelineContext`1 context) in c:\Solution\Working\VAL\1utxysrn.0.cs:line 564 Code => try { ftpClient = GetSFTPConnection(server, port, timeOut, userName, password, fileTransferType, blockSize, false);// This will Connect and Authenticate client if (ftpClient != null) { string remoteFileName = ftpClient.CombinePath(remotePath, fileName); using (MemoryStream memoryStream = new MemoryStream()) { ftpClient.DownloadFile(remoteFileName, memoryStream); if (memoryStream != null && memoryStream.Length > 0) { memoryStream.Position = 0; return Convert.ToBase64String(memoryStream.ToArray()); } } } } catch (Exception e) { throw e; } Is there any other way to get detailed error message instead of just Permission Denied? Or is there any other issue here from Component Pro side?
edited 4/19/2023 2:04:23 PM
asked 4/18/2023 5:25:45 PM
add a comment

3 Answers

0
Hi, I mean something like this [exmaple][1] [1]: https://serverfault.com/questions/571289/vsftpd-default-uploaded-file-permissions-on-ubuntu-not-working
 
answered 4/27/2023 4:03:20 PM
add a comment
0
Thank you for reply Martin. Yes, We have Read and Write permissions. Other files downloaded successfully but one of them got failed and gave "Permission Denied" error.
edited 4/26/2023 3:18:02 PM
answered 4/26/2023 3:15:17 PM
add a comment
0
Hi, Please file permission. Does the file have FTP permission read/write access? Thanks for contacting us.
 
answered 4/24/2023 9:20:36 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged sftp asp.net mvc or ask your own question.