volumes: make sshfs work

This commit is contained in:
Girish Ramakrishnan
2021-06-20 23:29:24 -07:00
parent 87c22a4670
commit 79ec7fb245
+2 -2
View File
@@ -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