diff --git a/btrfs.go b/btrfs.go index 21fed51..79be04b 100644 --- a/btrfs.go +++ b/btrfs.go @@ -29,6 +29,11 @@ func Open(path string, ro bool) (*FS, error) { ) if ro { dir, err = os.OpenFile(path, os.O_RDONLY|syscall.O_NOATIME, 0644) + if err != nil { + // Try without O_NOATIME as it requires ownership of the file + // or other priviliges + dir, err = os.OpenFile(path, os.O_RDONLY, 0644) + } } else { dir, err = os.Open(path) }