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(Installation): Adjust the data directory's permissions to 777 to allow access for users in the container. #8876

Merged

Conversation

orange-guo
Copy link
Contributor

@orange-guo orange-guo commented Nov 8, 2023

How to reproduce this behavior

After executing the 'prepare-directories.sh' script as per the documentation to set up the 'data' directory and launching the containers using 'docker compose up,' an error was encountered in the Gloo container:

{"level":"warn","ts":"2023-11-22T02:42:11.034Z","logger":"gloo.v1.event_loop.gloo.reporter","caller":"reporter/reporter.go:305","msg":"failed to write status state:Accepted reported_by:\"gloo\" for resource petstore: error writing to apply status: writing file: open /data/config/upstreams/gloo-system/petstore.yaml: permission denied","version":"1.14.0-beta1"}

It seems that the issue revolves around the permissions required for the 'data' directory. The user inside the container needs read and write permissions for 'other' (xx7) to access files within 'data'.

Solution

  • Adjust the data directory's permissions to 777 to allow access for users in the container

…mple 'docker-compose-file' to specify the container execution user as 'root' to ensure the mounted volume can be accessed.
@solo-build-bot
Copy link

solo-build-bot bot commented Nov 8, 2023

Waiting for approval from someone in the solo-io org to start testing.

@sam-heilbron
Copy link
Contributor

Thanks for the contribution @orange-guo! Can you share the steps in your PR body to outline how to reproduce this behavior and how to demonstrate that this works as expected?

Can you also check out our recommendations for Pull Request guidelines (https://github.com/solo-io/gloo/blob/main/devel/contributing/pull-requests.md#include-a-changelog-entry), specifically the part about adding a changelog entry?

@orange-guo orange-guo changed the title Fix(Installation): Update docker-compose.yaml to ensure the mounted volume can be accessed. Fix(Installation): Adjust the data directory's permissions to 777 to allow access for users in the container. Nov 22, 2023
@sam-heilbron
Copy link
Contributor

/test

@sam-heilbron
Copy link
Contributor

/skip-changelog small script update

Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! One question about a way we might be able to limit the permissions further.

Whatever we introduce in this script, we'll likely need to add to https://github.com/solo-io/gloo/blob/main/install/docker-compose-consul/prepare-directories.sh as well.

sam-heilbron
sam-heilbron previously approved these changes Nov 29, 2023
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

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

LGTM

@sam-heilbron sam-heilbron dismissed their stale review November 29, 2023 15:17

changelog-bot failing

@inFocus7
Copy link
Contributor

Happy to approve once the change-log issues are resolved 👍🏼

@sam-heilbron
Copy link
Contributor

/test

Copy link
Contributor

@inFocus7 inFocus7 left a comment

Choose a reason for hiding this comment

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

🚀 Thanks for the contribution @orange-guo!

@soloio-bulldozer soloio-bulldozer bot merged commit a2e18d6 into solo-io:main Nov 30, 2023
13 checks passed
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.

None yet

3 participants