diff --git a/apps/telephony/telephony.yaml b/apps/telephony/telephony.yaml index 4aa97a4..4ca4de3 100644 --- a/apps/telephony/telephony.yaml +++ b/apps/telephony/telephony.yaml @@ -127,10 +127,13 @@ spec: initContainers: - name: fix-data-perms image: busybox:latest - # Also chown /shared-tts (hostPath /tmp/tts-audio) so the non-root - # app user (uid 1654) can write Piper .sln16 files that Asterisk - # reads at /var/lib/asterisk/sounds/tts. World-readable (755) is - # fine — Asterisk runs as a different uid in the other pod. + # Must run as root to chown the hostPath /tmp/tts-audio that may be + # root-owned after node reboot. Pod-level runAsNonRoot:true would + # otherwise inherit and chown would fail with EPERM (see Notes memory + # feedback_hostpath_initcontainer_chown_perms). + securityContext: + runAsUser: 0 + runAsNonRoot: false command: ["sh", "-c", "chown -R 1654:1654 /data && chown 1654:1654 /shared-tts && chmod 0755 /shared-tts"] volumeMounts: - name: telephony-data