Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix from https://github.com/buildpacks/pack/pull/1672 is breaking change #1800

Closed
natalieparellano opened this issue Jun 14, 2023 · 1 comment · Fixed by #1810
Closed
Assignees
Labels
good first issue A good first issue to get started with. status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Milestone

Comments

@natalieparellano
Copy link
Member

Summary

This was discussed in Working Group and summarized in Slack here and here

At build time, we copy the application (source) directory into the build container using archive.WriteDirToTar. #1672 fixes weird permissions on this directory, but it's also a breaking change:

  • if the build-time user and the runtime user are different (as recommended by the spec), and
  • the host umask at build-time is less permissive resulting in e.g., 0755 permissions for newly created directories, and
  • the runtime user tries to write to the application directory, THEN

applications can fail to start. This can be remedied (e.g., by setting the umask at build time to something like 0002) but this could be a breaking change for some users of pack.

Proposed fix:

  • Partially revert Use OS-default permissions when creating archive root #1672 so that we don't create the weird permissions when includeRoot is provided to archive.WriteDirToTar, but instead of using default permissions for newly created directories on the host, simply use 0777 for the application directory as the least breaking change. See linked threads for other fixes discussed and why we feel that this one is the "best"
@natalieparellano natalieparellano added type/bug Issue that reports an unexpected behaviour. status/triage Issue or PR that requires contributor attention. status/ready Issue ready to be worked on. good first issue A good first issue to get started with. and removed status/triage Issue or PR that requires contributor attention. labels Jun 14, 2023
@natalieparellano natalieparellano added this to the 0.30.0 milestone Jun 14, 2023
@dlion
Copy link
Member

dlion commented Jun 20, 2023

I'd like to pick this up :) @natalieparellano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with. status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@dlion @natalieparellano and others