volumes: fix various mount related issues

Various notes on mounting:

* The permissions come from the mounted file system and not the mount point.
This means that if we change the perms before mounting, it is overridden by
whatever is in the actual file system.

* uid/gid only works for permission-less file systems

SFTP container notes:

* Assumes that nothing changed if the host path hasn't changed. This means that
if a user changes the disk uuid, reload doesn't work.

* Not sure how/why, but even after unmounting the container can still access the old
mount files (!). With ext4 on disk change or nfs after root path change, the file manager
continues to be able to access the old mounts (despite umount succeeding).

All this led to following changes:

* Remove editing of volumes. Just allow editing username/password.
* edit UI then just also provides a way to re-mount.
* Change mode of mountpoint to be 777 post mounting for ease of use. Otherwise, we have to
make the user do this by ssh. this can always become options later.
This commit is contained in:
Girish Ramakrishnan
2021-06-21 12:11:05 -07:00
parent f433146484
commit 6ace8d1ac5
6 changed files with 46 additions and 72 deletions

View File

@@ -452,7 +452,7 @@ function setBackupConfig(backupConfig, callback) {
if (oldMount && (!backups.isMountProvider(backupConfig.provider) || (newMount && newMount.hostPath !== oldMount.hostPath))) {
debug('setBackupConfig: removing old mount configuration');
await safe(mounts.removeMountFile(oldMount.hostPath));
await safe(mounts.removeMount(oldMount));
}
notifyChange(exports.BACKUP_CONFIG_KEY, backupConfig);