volumes: make sshfs work
This commit is contained in:
+2
-2
@@ -82,11 +82,11 @@ function renderMountFile(volume) {
|
||||
const keyFilePath = path.join(paths.SSHFS_KEYS_DIR, `id_rsa_${mountOptions.host}`);
|
||||
|
||||
safe.fs.mkdirSync(paths.SSHFS_KEYS_DIR);
|
||||
if (!safe.fs.writeFileSync(keyFilePath, mountOptions.privateKey, { mode: 0o600 })) throw new BoxError(BoxError.FS_ERROR, safe.error);
|
||||
if (!safe.fs.writeFileSync(keyFilePath, `${mountOptions.privateKey}\n`, { mode: 0o600 })) throw new BoxError(BoxError.FS_ERROR, safe.error);
|
||||
|
||||
type = 'fuse.sshfs';
|
||||
what= `${mountOptions.user}@${mountOptions.host}:${mountOptions.remoteDir}`;
|
||||
options = `defaults,allow_other,port=${mountOptions.port},IdentityFile=${keyFilePath},reconnect,uid=yellowtent,gid=yellowtent`;
|
||||
options = `allow_other,port=${mountOptions.port},IdentityFile=${keyFilePath},reconnect`;
|
||||
break;
|
||||
}
|
||||
case 'noop': // volume provider
|
||||
|
||||
Reference in New Issue
Block a user