diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs index d0c2b90a..cc7a39bd 100644 --- a/pbs-datastore/src/datastore.rs +++ b/pbs-datastore/src/datastore.rs @@ -874,7 +874,7 @@ impl DataStore { (Some(inner), None) => bail!("unexpected error on datastore traversal: {inner}"), }; if inner.kind() == io::ErrorKind::PermissionDenied { - if err.depth() == 0 && path.ends_with("lost+found") { + if err.depth() <= 1 && path.ends_with("lost+found") { // allow skipping ext4 fsck-directory on EPERM only, otherwise we might prune // too many chunks. E.g., if users messed up with owner/perms on a rsync return Ok(());