From: Daan De Meyer Date: Thu, 1 Aug 2024 07:45:01 +0000 (+0200) Subject: Don't try to chmod /tmp if it's being bind mounted in X-Git-Tag: v25~378^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2929%2Fhead;p=thirdparty%2Fmkosi.git Don't try to chmod /tmp if it's being bind mounted in --- 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: