#!/bin/bash
set -e

# Fix ownership of bind-mounted volume directories at container startup.
# This script runs as root; the server process is started as UID 1001 via setpriv.
chown -R 1001:0 /home/cma
exec setpriv --reuid=1001 --regid=0 --clear-groups "$@"
