-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support controlling the user, group, and permissions of the application files #399
Comments
We do need to do this, but I think it'll require a bit of a rework of the current model. Images are made of many <ContainerLayer Include="$(PublishDir)/**/*"
Destination="/app"
User="$(ContainerAppUserId)"
Group="$(ContainerAppGroupId)"
Permissions="644" /> and have the tooling generate those tarballs with the correct permissions in-order. |
That is very flexible, it allows including different files with different permissions in the layer. I'm looking to control the 'default values' for User, Group, and Permissions. We should be able to implement those separate from introducing
note: Unix permissions for directories require the 'x' bit. If you want to avoid a separate permission parameter for directories, we can take this value and use it for files. For directories, we can add an 'x' for each 'r' permission. So |
Is this the same as: |
Yes, exactly - it allows fine grained control of the permissions of copied files. |
My request is less fine-grained than the suggested I'm looking to control the values which are currently fixed to sdk-container-builds/Microsoft.NET.Build.Containers/Layer.cs Lines 77 to 82 in 6da3967
Can we add parameters to control these? |
When the tooling is used with Microsoft images, the non-root user does not have write-access to the application folder since that application folder is owned by root and only writable by the owner. That means it's OK for the non-root user of the Red Hat images to also to not have write access to the application folder. I no longer consider this a must-have to support the Red Hat images. I'm fine if the issue gets closed, or stays open for others to declare an interest in controlling the application folder permissions. |
We also need some fine-grained control over directory permissions from the Of course you might consider that this should not be the way to do so, but the point is that we have no control over it. The current workaround is to manually attach to the container after redeploy and reconfigure the |
The current implementation unconditionally uses
-rwxr-xr-x.
androot:root
for the application files.It would be nice to be able to:
The umask could be made settable through a property, like
ContainerAppUMask
.When set, the effective permissions of a file/directory are the result of using the file's owner permission for owner, group and other, and applying
ContainerAppUMask
to it. That means, the effective permissions are as if the application was published underumask $(ContainerAppUMask)
.Controlling the user/group of these files would allow to match their ownership with the
app
user, and thus allowing that user to change the files on a running container. It could be done through properties like:ContainerAppOwner
,ContainerGroup
which are set to auid
/gid
. Or some property like:ContainerAppOwnedByUser=true
which makes the ownership match with the app user and group.cc @baronfel @richlander @omajid @aslicerh
The text was updated successfully, but these errors were encountered: