I'm using the node-ssh2
module to copy files to remote servers. In general I don't have the ability to change the default umask on the servers. But I need the remote file's mode to be 0666 after it's copied.
If I set it first locally and then just run scp -p <localfile> <remote>
it works fine, preserving the 0666 permission. How do I do this with node.js? I've tried using node-ssh2
and starting an sftp session. Then I do sftp.fastPut
but the permissions are always set to 0644 on the server.
As I said I'm currently using the node-ssh2
module and I'd like to stick with that but if I need use something different that is ok.