diff --git a/nvx-rs/src/host/platform/linux/private.rs b/nvx-rs/src/host/platform/linux/private.rs
index 453e09613..2ff82605b 100644
--- a/nvx-rs/src/host/platform/linux/private.rs
+++ b/nvx-rs/src/host/platform/linux/private.rs
@@ -2,10 +2,10 @@
//! their owners and modes, and the sparse files and the renames without replacement of the
//! stores.
-use std::fs::{self, DirBuilder, File, OpenOptions, Permissions};
+use std::fs::{self, DirBuilder, File, Permissions};
use std::io;
use std::os::fd::AsRawFd;
-use std::os::unix::fs::{DirBuilderExt, MetadataExt, OpenOptionsExt, PermissionsExt};
+use std::os::unix::fs::{DirBuilderExt, MetadataExt, PermissionsExt};
use std::path::Path;
use nix::sys::stat::Mode;
@@ -167,10 +167,7 @@ pub(crate) fn rename_no_replace(from: &Path, to: &Path) -> io::Result<()> {
pub(crate) fn restore_private_file_mode(path: &Path, mode: Mode) -> io::Result<()> {
use nix::fcntl::OFlag;
- let opened = OpenOptions::new()
- .read(true)
- .custom_flags((OFlag::O_PATH | OFlag::O_NOFOLLOW).bits())
- .open(path);
+ let opened = open_to_locate(path, OFlag::O_NOFOLLOW);
let file = match opened {
Ok(file) => file,
Err(error)
@@ -198,10 +195,7 @@ pub(crate) fn restore_private_file_mode(path: &Path, mode: Mode) -> io::Result<(
fn open_plain_dir(path: &Path) -> io::Result