Replies: 2 comments 6 replies
-
There's a way to get the user by inspecting the container. One can use this command:
There we can check the user (ID): Can we trust that this UID is going to be used in next versions? |
Beta Was this translation helpful? Give feedback.
-
A possible option, if you are using Kubernetes, is to specify a security context with the fsGroup property: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod This will allow the container processes within the pod to have a supplemental group identifier (whichever value you specified) and the group owner of the volume will be changed to that same identifier. This would possibly allow you to not have to interrogate/change the uid of any container processes or files on the volume. |
Beta Was this translation helpful? Give feedback.
-
I'm currently facing a problem where the application container must have access to an external volume. It needs to have both read and write permissions for the application to work properly.
When this application tries to check the volume, it throws an error related to the lack of permissions.
How should we handle this, considering the .NET chiseled best practices?
I was considering to change the permissions of the volume folder, but I'm unsure if this is the right path to follow. My main concern is related to the trust in the non-root user of the chiseled image. I was trying to get its information by using the
id
command, but this tool is not available in the chiseled image.If you guys can share how can I consult the UID and GID of the non-root user of a chiseled image, that would be cool as well.
Beta Was this translation helpful? Give feedback.
All reactions