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.
This commit is contained in:
ashisgreat22 2026-03-19 23:13:41 +01:00
parent 49ffe471a3
commit aa670604b5

View file

@ -59,9 +59,10 @@ in
# Copy the declarative config before starting the container # Copy the declarative config before starting the container
# This allows OpenClaw to safely write/rename the file at runtime without EBUSY errors # This allows OpenClaw to safely write/rename the file at runtime without EBUSY errors
systemd.services."podman-openclaw".preStart = lib.mkBefore '' systemd.services."podman-openclaw".preStart = lib.mkBefore ''
mkdir -p /var/lib/openclaw
cp -f ${./openclaw-config.json} /var/lib/openclaw/openclaw.json cp -f ${./openclaw-config.json} /var/lib/openclaw/openclaw.json
chown 1000:1000 /var/lib/openclaw/openclaw.json chown -R 1000:1000 /var/lib/openclaw
chmod 644 /var/lib/openclaw/openclaw.json chmod -R u+rwX /var/lib/openclaw
''; '';
}; };
} }