Skip to content

Owner of /build folder in container #32

@martinkunkel2

Description

@martinkunkel2

Background:
Vscode/devcontainer framework is executing a user mapping, so that the uid of the ebcl user in the container matches the uid on the host. This also updates the permissions of the home folder: https://github.com/devcontainers/cli/blob/7178cebfa88e070439903fd975b7602e7b3f6dc7/scripts/updateUID.Dockerfile#L31

Problem is that other folders are not updated, so the /build folder is still owned by the original UID of the ebcl user.
Example from my setup:

host:
uid=1000(martin) gid=1000(martin)

container image ghcr.io/elektrobit/ebcl_dev_container:v1.4.4:
uid=1001(ebcl) gid=1000(ebcl)

in vscode devcontainer:
uid=1000(ebcl) gid=1000(ebcl)

but the /build folder is still owned by 1001:

(venv) ebcl@ext_ebcl-adg-app:/workspace$ ls -la /build
total 40
drwxr-xr-x 1 1001 ebcl 4096 Dec  2 19:10 .
drwxr-xr-x 1 root root 4096 Dec  3 15:47 ..

Is it a problem that the user can now not write to /build?
If this is not a problem, then: can the /build folder be owned by root?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions