diff --git a/CHANGES b/CHANGES index 30983810d..ff7216f90 100644 --- a/CHANGES +++ b/CHANGES @@ -2433,4 +2433,5 @@ * Fix crash in cloudron-firewall when ports are whitelisted * eventlog: add event for certificate cleanup * eventlog: log event for mailbox alias update +* backups: fix incorrect mountpoint check with managed mounts diff --git a/src/storage/filesystem.js b/src/storage/filesystem.js index c3042553a..b58495d9d 100644 --- a/src/storage/filesystem.js +++ b/src/storage/filesystem.js @@ -83,7 +83,7 @@ async function checkPreconditions(apiConfig, dataLayout, callback) { // Check filesystem is mounted so we don't write into the actual folder on disk if (apiConfig.provider === PROVIDER_SSHFS || apiConfig.provider === PROVIDER_CIFS || apiConfig.provider === PROVIDER_NFS || apiConfig.provider === PROVIDER_EXT4) { - if (result.mountpoint !== apiConfig.mountPoint) return callback(new BoxError(BoxError.FS_ERROR, `${apiConfig.mountPoint} is not mounted`)); + if (result.mountpoint !== paths.MANAGED_BACKUP_MOUNT_DIR) return callback(new BoxError(BoxError.FS_ERROR, 'Backup target is not mounted')); } else if (apiConfig.provider === PROVIDER_MOUNTPOINT) { if (result.mountpoint === '/') return callback(new BoxError(BoxError.FS_ERROR, `${apiConfig.backupFolder} is not mounted`)); }