Open maxgio92 opened 1 week ago
To expand on this
This happens on systems like linux where melange is ran as your $USER, while dockerd is running as root, ans $USER is in docker group.
Probably something localized in the git step, that chowns as root (which is the user running inside docker)
@89luca89 There are two things - melange is using MkdirTemp that sets directory to 0700 (and it's later chown-ed to root) and also git-checkout and its use of tar
overriding permissions for /home/build
to 0700.
Fixed in #1646 but I am not sure if this is fully solving it - any builds that create directories / files not readable by user melange is running at will failed to be packaged.
This is basically this issue: https://github.com/chainguard-dev/melange/issues/1254
Issue
When running as non-root, the destination dir in the workspace directory being owned by root can't be created, in the subpackage pipelines.
How to reproduce
It can be reproduced running this pipeline with the Docker runner.
Log:
The workspace directory is created as root because of Docker during the bind mount of it as volume. The pipeline is run as root, but the destination directory mkdir it seems is not.
Additional info
It would be nice to reach a state where all the pipeline is run as an unprivileged user with proper permissions and ownership across all the filesystem as it happens for the Bubblewrap environment with the unshared user namespace.