appdata: cannot use cifs or sshfs

Fixes #827
This commit is contained in:
Girish Ramakrishnan
2023-07-11 20:52:46 +05:30
parent 1bf91413c4
commit 0ab72f5900
4 changed files with 8 additions and 2 deletions

View File

@@ -515,6 +515,9 @@ async function checkStorage(app, volumeId, prefix) {
const volume = await volumes.get(volumeId);
if (volume === null) throw new BoxError(BoxError.BAD_FIELD, 'Storage volume not found');
// lack of file perms makes these unsupported
if (volume.mountType === 'cifs' || volume.mountType === 'sshfs') throw new BoxError(BoxError.BAD_FIELD, `${volume.mountType} volumes cannot be used as data directory`);
const status = await volumes.getStatus(volume);
if (status.state !== 'active') throw new BoxError(BoxError.BAD_FIELD, 'Volume is not active');