Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Correctly set file ownership on startup #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DanielFallon
Copy link

[ "$(stat -c %u /vault/config)" != "$(id -u vault)" ] does not correctly test "If the config dir is bind mounted"

This will break if the user starts vault, then copies an additional file into the bind mounted config directory and then restarts the container. While the folder /vault/config will be still owned by vault:vault after the container is restarted, the newly created files will not mirror those permissions unless the sticky bit was set on the directory AND the user didn't inadvertently change them.

The result looks something like this:

Error loading configuration from /vault/config: error loading "/vault/config/local.json": open /vault/config/local.json: permission denied

@hashicorp-cla
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


Daniel Fallon seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA. If you already have a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

@netsandbox
Copy link

This would also fix #175

@netsandbox
Copy link

@stevendpclark may you can have a look at this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants