You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting up a pod via Kata CC, and running it w/ Image-RS there is an issue with the transfer of ownership for files if the dockerfile specifically alters it.
For example if the dockerfile is:
FROM ubuntu:22.04
RUN mkdir -p /other
# Create bob user
RUN groupadd -g 1000 bob && useradd -g bob -u 1000 -s /bin/bash bob
RUN chown -v bob:bob /other;
USER bob
ENTRYPOINT [ "/bin/bash", "-c", "ls -al other" ]
Expected output
The resulting log output should be:
total 8
drwxr-xr-x 1 bob bob 4096 Nov 17 13:33 .
drwxr-xr-x 1 root root 4096 Nov 17 13:52 ..
Actual output
However we end up getting:
total 0
drwxr-xr-x 1 root root 40 Nov 21 15:22 .
drwxr-xr-x 1 root root 80 Nov 21 17:02 ..
As shown the directory is still owned by just root, this should of been transferred to "bob".
Further information
I tested the kata environment across all the different areas as shown below in the table:
Description of problem
When setting up a pod via Kata CC, and running it w/ Image-RS there is an issue with the transfer of ownership for files if the dockerfile specifically alters it.
For example if the dockerfile is:
Expected output
The resulting log output should be:
Actual output
However we end up getting:
As shown the directory is still owned by just root, this should of been transferred to "bob".
Further information
I tested the kata environment across all the different areas as shown below in the table:
Could this be related to the unpack method currently being used here: https://github.com/confidential-containers/image-rs/blob/76e6abed950152f000d8f70026d11a86cf95fb0c/src/unpack.rs#L32-L34
The text was updated successfully, but these errors were encountered: