mscdex / mscdex/ssh2

FSETSTAT called when uploading with sftp.createWriteStream

Open
#1,453 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.8k
Forks
734
PR merge metrics
No merged PRs in 30d

Description

I have an SFTP server that disallows the FSETSTAT command (for security reasons, I believe), and I've been unable to upload files to the server using put. Calling sftp.createWriteStream calls fchmod method to set the write mode. If mode is not passed as an option, it defaults to 0o666, and passing null does not work.

Is there a way to upload a file from a buffer to the server without calling fchmod or chmod? The fastPut method is not an option because the source is a buffer and not a local file.

Contributor guide

No contributing guide indexed for this repository

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 at sftp.createWriteStream and the fchmod call described in the issue, then compare the put and fastPut paths. No test file is named; done means a buffer upload path can work without invoking fchmod or chmod.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.