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 /home/application being "write for all" (SSH login not working anymore) #43

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

baschny
Copy link
Member

@baschny baschny commented Apr 23, 2024

The "docker build" in "git context" used by the Github Actions seem to work differently now, using an "umask 000", so that all files which are being COPY in the Dockerfile will get a "666/777" permissions. And thus the SSH login won't work anymore:

Authentication refused: bad ownership or modes for directory /home/application/.ssh

We fix that in two ways:

  • Do not use the docker build "git context" in the github action anymore, instead we rely on the actions/checkout@v3 action which we are doing anyway before it
  • Make sure the permissions are fixed after the COPY instructions

baschny added 2 commits April 23, 2024 22:55
The default "git context" will garble the file permissions.
Apparently there is a "umask 000" (all files get 666/777 permissions).
This affects the "COPY /files/ssh/ /"
Make sure the copied files have the correct permissions regardless
on how docker copies them with "COPY" (so it does not depend on
local environmental circumstances).
@baschny baschny merged commit 72febfc into master Apr 23, 2024
6 checks passed
@baschny baschny deleted the fix-permissions branch April 23, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant