I have a Django application running on an mod_wsgi (embedded mode) Apache instance inside a Docker container. This container shares a volume (media/
) with the host.
When a user uploads a file, it is stored in the media/<file>
directory. The issue is that the file owner and group are both root
, and I need write access to these for a particular user (tech
) and/or group (tech-group
).
I'm assuming it is happening because python is running as root
in the container(?). Is there a way to instead have it run as tech
? Or somehow tell Django to write files as a particular user/group?