diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index 275d5a434..3a3039c16 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -373,6 +373,9 @@ func (m *MountPoint) Mount() (mountDaemon *os.Process, err error) { m.ErrChan, m.UnmountFn, err = m.MountFn(m.VFS, m.MountPoint, &m.MountOpt) if err != nil { + if len(os.Args) > 0 && strings.HasPrefix(os.Args[0], "/snap/") { + return nil, fmt.Errorf("mounting is not supported when running from snap") + } return nil, fmt.Errorf("failed to mount FUSE fs: %w", err) } m.MountedOn = time.Now()