WIP: Fix permissions for newly created dirs in ADD#41990
Closed
cpuguy83 wants to merge 1 commit intomoby:masterfrom
Closed
WIP: Fix permissions for newly created dirs in ADD#41990cpuguy83 wants to merge 1 commit intomoby:masterfrom
cpuguy83 wants to merge 1 commit intomoby:masterfrom
Conversation
edb62a3 made it so permissions are set for existing dirs, it also inadvertantly made it so `Chmod` is called against (previously) non-existing dirs. This had a side-effect that dir permissions are different than in previous version of Docker when using `ADD` to add a tarball during `docker build` (There may be other cases of this). This makes it so we don't set perms for paths that we created as part of `MkdirAll` since the perms should already be the ones we expect. Signed-off-by: Brian Goff <[email protected]>
Member
|
Heh, same conclusion as in early comments on #41978 🤦 |
Member
Author
|
Per discussion, we should just change pkg/archive to set 0755 instead of 0777. |
Member
Author
|
Replaced by #42016 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
edb62a3 made it so permissions are set
for existing dirs, it also inadvertantly made it so
Chmodis calledagainst (previously) non-existing dirs.
This had a side-effect that dir permissions are different than in
previous version of Docker when using
ADDto add a tarball duringdocker build(There may be other cases of this).This makes it so we don't set perms for paths that we created as part of
MkdirAllsince the perms should already be the ones we expect.Related to #41978
I don't understand what's happening here.
Why is it different? Why does the dir created with prior to calling
chmodhave 0755 permissions even though the caller passed in 0777?