Adding a shared folder to a container

lxc storage volume attach data-media data <container> <path>
lxc storage volume detach data-media data <container>

Changing group id and user id to access share data

id <user>

List processes running under user

The processes have to be stopped before changing the ids

ps -ef | grep <user>

Change the group id

groupmod -g 1337 <user>

Change the user id

usermod -u 1337 -g 1337 <user>