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.
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. Callingsftp.createWriteStreamcallsfchmodmethod to set the write mode. If mode is not passed as an option, it defaults to0o666, and passingnulldoes not work.Is there a way to upload a file from a buffer to the server without calling
fchmodorchmod? ThefastPutmethod is not an option because the source is a buffer and not a local file.