Skip to main content

ENV_TMPFS

Constant ENV_TMPFS 

Source
pub const ENV_TMPFS: &str = "MSB_TMPFS";
Expand description

Environment variable carrying tmpfs mount specs for guest init.

  • path — guest mount path (required, always the first element)
  • size=N — size limit in MiB (optional)
  • noexec — mount with noexec flag (optional)
  • nosuid — accepted as an explicit assertion; tmpfs mounts always use nosuid
  • ro — mount read-only (optional)
  • rw — explicit writable default (optional)
  • mode=N — permission mode as octal integer (optional, e.g. mode=1777)

Format: path[:opts][;path[:opts];...].

Entries are separated by ;. Within an entry, the path comes first, followed by an optional colon and comma-separated options. Options compose order-independently (e.g. :ro,noexec and :noexec,ro are equivalent).

Examples:

  • MSB_TMPFS=/tmp:size=256 — 256 MiB tmpfs at /tmp
  • MSB_TMPFS=/tmp:size=256;/var/tmp:size=128 — two tmpfs mounts
  • MSB_TMPFS=/tmp — tmpfs at /tmp with defaults
  • MSB_TMPFS=/tmp:size=256,noexec — with noexec flag
  • MSB_TMPFS=/seed:size=64,ro — read-only tmpfs