From a35a24b8b4f7d57c95be45c479a54e0310d63443 Mon Sep 17 00:00:00 2001 From: Kyle Lacy Date: Tue, 2 Oct 2018 21:34:28 -0700 Subject: [PATCH] mount: Enable "DefaultPermissions" FUSE option by default This enforces the Unix permissions of the snapshot files within the mounted filesystem, which will only allow users to access snapshot files if they had access to the file outside of the snapshot. --- cmd/restic/cmd_mount.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/restic/cmd_mount.go b/cmd/restic/cmd_mount.go index 3e6382192..2e8406357 100644 --- a/cmd/restic/cmd_mount.go +++ b/cmd/restic/cmd_mount.go @@ -120,6 +120,8 @@ func mount(opts MountOptions, gopts GlobalOptions, mountpoint string) error { mountOptions = append(mountOptions, systemFuse.AllowOther()) } + mountOptions = append(mountOptions, systemFuse.DefaultPermissions()) + c, err := systemFuse.Mount(mountpoint, mountOptions...) if err != nil { return err