From aa670604b5c3cc3ea32aa38ab8c2eabd198dd822 Mon Sep 17 00:00:00 2001 From: ashisgreat22 Date: Thu, 19 Mar 2026 23:13:41 +0100 Subject: [PATCH] fix(openclaw): recursively fix permissions on data directory - Use 'chown -R 1000:1000' and 'chmod -R u+rwX' in the preStart script. - This ensures all files in /var/lib/openclaw are accessible by the container's node user. --- modules/openclaw-podman.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/openclaw-podman.nix b/modules/openclaw-podman.nix index 22aa609..53060d3 100644 --- a/modules/openclaw-podman.nix +++ b/modules/openclaw-podman.nix @@ -59,9 +59,10 @@ in # Copy the declarative config before starting the container # This allows OpenClaw to safely write/rename the file at runtime without EBUSY errors systemd.services."podman-openclaw".preStart = lib.mkBefore '' + mkdir -p /var/lib/openclaw cp -f ${./openclaw-config.json} /var/lib/openclaw/openclaw.json - chown 1000:1000 /var/lib/openclaw/openclaw.json - chmod 644 /var/lib/openclaw/openclaw.json + chown -R 1000:1000 /var/lib/openclaw + chmod -R u+rwX /var/lib/openclaw ''; }; }