Open ricardo85x opened 5 years ago
It is look like it is not possible to keep the mode
https://github.com/mscdex/ssh2-streams/issues/128
Maybe we can provide a config where we can set the mode manually when we create a connection
on FsProvider.js I did change the following to keep the mode 777:
Remove:
const remote: Writable = conn.sftp.createWriteStream(uri.path, { flags: openFlags });
Add:
var mode = parseInt('0666',8) // default mode from ssh2-streams
const listExecutableExt = ['.PY', '.SH']; // executable files
listExecutableExt.forEach(function(ext) {
if (String(uri.path).toUpperCase().endsWith(ext)) {
mode = parseInt('0777',8)
}
})
const remote: Writable = conn.sftp.createWriteStream(uri.path, { flags: openFlags, mode });
Maybe we can provide a config where we can set the mode manually when we create a connection
Need to add, because after changing to 666 i get internal server error...
THIS NEEDS TO BE FIXED ASAP
Any update with that? 3 Years of pain))
hi thanks for this amazing extension.
I would like to know if is it possible to set the file permission when you make a change on a remote file.
today it is look like it is setting rw-rw-rw when I save the file.
I have some script on a linux server and it should be rwx.