Hi @nelson,
When the local /data
directory is mounted on the device (to a local volume), the permissions are effectively overwritten (as the Supervisor, running as root
, carries out this bind). This obviously means, regardless of any volume that’s been given permissions previously, the local volume storage will default to root
.
This is why under a distribution (such as the small example I posted last week with Debian Stretch) you need to change the permissions at runtime as part of your entry script. Similarly, if you want to use a scratch
image, you’re going to have to copy appropriate tools, such as chown
into that image to allow the alteration of permissions at runtime.
Unfortunately, I don’t believe there’s any other way to currently carry this out. We can’t easily alter the ability to change permissions of ownership on a volume bind, because we don’t know in advance the user that needs to own it (uid/gid). I’m going to raise a ticket internally attached to this conversation, so we can consider this as I do understand why you’d like to execute and own the volume as a non-root user, but unfortunately I can’t think of any other solution at the moment.
Best regards, Heds