diff --git a/fuse/main.rs b/fuse/main.rs index 849e1718a230a367bfc5b14f986ee6c7494a643a..d2689a5dc8ee9e96b8d075b6382d3a536a4afd50 100644 --- a/fuse/main.rs +++ b/fuse/main.rs @@ -7,6 +7,7 @@ extern crate time; use image::Image; use std::env; +use std::ffi::OsStr; use std::path::Path; use time::Timespec; use fuse::{FileType, FileAttr, Filesystem, Request, ReplyData, ReplyEntry, ReplyAttr, ReplyCreate, ReplyDirectory, ReplyEmpty, ReplyStatfs, ReplyWrite}; @@ -269,7 +270,14 @@ fn main() { if let Some(mountpoint) = env::args_os().nth(2) { fuse::mount(RedoxFS { fs: filesystem - }, &mountpoint, &[]); + }, &mountpoint, &[ + // One of the uses of this redoxfs fuse wrapper is to populate a filesystem + // while building the Redox OS kernel. This means that we need to write on + // a filesystem that belongs to `root`, which in turn means that we need to + // be `root`, thus that we need to allow `root` to have access. + OsStr::new("-o"), + OsStr::new("allow_root"), + ]); } else { println!("redoxfs: no mount point provided"); }