From 223fba7573585f7c66f2f1921329cec24e941355 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 1 Aug 2024 09:45:01 +0200 Subject: [PATCH] Don't try to chmod /tmp if it's being bind mounted in --- mkosi/sandbox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkosi/sandbox.py b/mkosi/sandbox.py index 459199fb4..0ba5b9a6c 100644 --- a/mkosi/sandbox.py +++ b/mkosi/sandbox.py @@ -226,7 +226,8 @@ def sandbox_cmd( # bubblewrap creates everything with a restricted mode so relax stuff as needed. ops = [] if not relaxed: - ops += ["chmod 1777 /tmp"] + if not any(Path(m.dst) == Path("/tmp") for m in mounts): + ops += ["chmod 1777 /tmp"] if not devices: ops += ["chmod 1777 /dev/shm"] if vartmpdir: -- 2.47.2