mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix access right issues with download file via SSH
This commit is contained in:
@@ -309,7 +309,7 @@ export class Ssh implements INodeType {
|
||||
|
||||
const credentials = this.getCredentials('sshPrivateKey') as IDataObject;
|
||||
|
||||
const { path, } = await file();
|
||||
const { path, } = await file({ prefix: 'n8n-ssh-' });
|
||||
temporaryFiles.push(path);
|
||||
await writeFile(path, credentials.privateKey as string);
|
||||
|
||||
@@ -346,7 +346,7 @@ export class Ssh implements INodeType {
|
||||
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i) as string;
|
||||
const parameterPath = this.getNodeParameter('path', i) as string;
|
||||
|
||||
const { path } = await file({ mode: 0x0777, prefix: 'prefix-' });
|
||||
const { path } = await file({ prefix: 'n8n-ssh-' });
|
||||
temporaryFiles.push(path);
|
||||
|
||||
await ssh.getFile(path, parameterPath);
|
||||
@@ -389,7 +389,7 @@ export class Ssh implements INodeType {
|
||||
throw new Error(`No binary data property "${propertyNameUpload}" does not exists on item!`);
|
||||
}
|
||||
|
||||
const { path } = await file();
|
||||
const { path } = await file({ prefix: 'n8n-ssh-' });
|
||||
temporaryFiles.push(path);
|
||||
await writeFile(path, Buffer.from(binaryData.data, BINARY_ENCODING));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user