sshnet / sshnet/SSH.NET

Permission denied while ploading a file

Open
#696 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

Version: 2016.1.0.0

Issue: We have a scenario where we download the file from clients SFTP server and put it in s3 and append something to that and overwrite the existing file in SFTP. While uploading the file we are seeing this issue of permission denied.

I tried uploading the file manually through filezilla and it works without issues.

Error Details:

Message: Permission Denied.

Stack Trace:

at Renci.SshNet.Sftp.SftpSession.RequestOpen(String path, Flags flags, Boolean nullOnError)\n at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action`1 uploadCallback)\n at

I would like know

Why this is happening?
Will there be a scenario where the SFTP transfer works with filzilla but not using SSH.NET?
How to capture the messages from SSH.NET programatically?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the SftpClient upload described in the issue and inspect the RequestOpen and InternalUploadFile stack entries. Compare the SSH.NET transfer with the successful FileZilla transfer and determine how to capture SSH.NET messages programmatically; done means identifying the cause of the permission difference and documenting the relevant diagnostic output.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.