Skip to content

copy link breaks permissions with buildkit rootless #6069

@oOraph

Description

@oOraph

Contributing guidelines and issue reporting guide

Well-formed report checklist

  • I have found a bug that the documentation does not mention anything about my problem
  • I have found a bug that there are no open or closed issues that are related to my problem
  • I have provided version/information about my environment and done my best to provide a reproducer

Description of bug

Bug description

COPY --link command leads to weird permissions overrides in the resulting image with the setgid permission set on the resulting directory
this may be related to this issue
#2842
or not, not sure yet

more precisely the problem is that if we copy anything with --link into tmp, for example the resulting permissions are sth like:

drwxr-sr-x 1 root root 4.0K Jul  8 12:05 /tmp

instead of drwxrwxrwt (quite important permission set for tmp)

Reproduction

See reproduce.sh in

https://github.com/oOraph/dig-buildkit-rootless-permissions

Version information

Using current moby/buildkit:rootless docker image tag

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions