(** Privileged execution. Container builds produce root-owned files. We need sudo for cleanup and overlay mounting. Functions try without sudo first and fall back on permission errors. *) val run : ?output_file:Fpath.t -> Eio_unix.Stdenv.base -> Bos.Cmd.t -> (Run.t, [> Rresult.R.msg ]) result (** [run ?output_file env cmd] executes [cmd] with sudo prepended. When [output_file] is given, stdout/stderr are redirected to that file instead of being captured via pipes. *) val rm_rf : Eio_unix.Stdenv.base -> Fpath.t -> (unit, [> Rresult.R.msg ]) result (** [rm_rf env path] removes [path] recursively. Tries without sudo first; falls back to [sudo rm -rf] on EACCES/EPERM. *)