Skip to content

[20.10 backport]: avoid creating parent dirs for XGlobalHeader, and fix permissions#42017

Merged
thaJeztah merged 2 commits into
moby:20.10from
thaJeztah:20.10_backport_build_fixes
Feb 22, 2021
Merged

[20.10 backport]: avoid creating parent dirs for XGlobalHeader, and fix permissions#42017
thaJeztah merged 2 commits into
moby:20.10from
thaJeztah:20.10_backport_build_fixes

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

fixes #41978

backport of:

@thaJeztah thaJeztah added this to the 20.10.4 milestone Feb 12, 2021
@thaJeztah
thaJeztah force-pushed the 20.10_backport_build_fixes branch 2 times, most recently from 7d42a9d to c7ac87f Compare February 17, 2021 15:26
tonistiigi and others added 2 commits February 17, 2021 21:12
Signed-off-by: Tonis Tiigi <[email protected]>
(cherry picked from commit ba7906a)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Commit edb62a3 fixed a bug in MkdirAllAndChown()
that caused the specified permissions to not be applied correctly. As a result
of that bug, the configured umask would be applied.

When extracting archives, Unpack() used 0777 permissions when creating missing
parent directories for files that were extracted.
Before edb62a3, this resulted in actual
permissions of those directories to be 0755 on most configurations (using a
default 022 umask).

Creating these directories should not depend on the host's umask configuration.
This patch changes the permissions to 0755 to match the previous behavior,
and to reflect the original intent of using 0755 as default.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 25ada76)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
thaJeztah force-pushed the 20.10_backport_build_fixes branch from c7ac87f to 5d442b1 Compare February 17, 2021 20:13
@thaJeztah

Copy link
Copy Markdown
Member Author

rebased to trigger CI with test-fixes that were merged

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah

thaJeztah commented Feb 18, 2021

Copy link
Copy Markdown
Member Author

Not sure why this is failing on ppc64le; kicking again, but could be something related to that platform?

=== FAIL: ppc64le.integration.build TestBuildUserNamespaceValidateCapabilitiesAreV2 (16.68s)
Loaded image: buildpack-deps:buster
Loaded image: busybox:latest
Loaded image: busybox:glibc
Loaded image: debian:bullseye
Loaded image: hello-world:latest
Loaded image: arm32v7/hello-world:latest
    build_userns_linux_test.go:73: assertion failed: error is not nil: The command '/bin/sh -c setcap CAP_NET_BIND_SERVICE=+eip /bin/sleep' returned a non-zero code: 1

edit: so... why is it loading arm32v7/hello-world:latest on a ppc64le machine??

@thaJeztah
thaJeztah merged commit 148e6c9 into moby:20.10 Feb 22, 2021
@thaJeztah
thaJeztah deleted the 20.10_backport_build_fixes branch February 22, 2021 19:04
chia7712 pushed a commit to apache/kafka that referenced this pull request Jun 19, 2025
#19994)

Adds a new section **"Installation Preparation"** to the Kafka Docker
examples README. It documents a known issue with Docker versions prior
to 20.10.4, where directory permissions (such as `/opt/kafka/config`)
are not properly set, causing startup failures for non-root users (e.g.,
`appuser`).

This issue was fixed in Docker [20.10.4
release](https://docs.docker.com/engine/release-notes/20.10/#20104),
specifically in Use 0755 permissions when creating missing directories
[moby/moby#42017](moby/moby#42017).

Reviewers: Jhen-Yung Hsu <[email protected]>, Lan Ding
 <[email protected]>, Chia-Ping Tsai <[email protected]>

---------

Co-authored-by: Jhen-Yung Hsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants