Change owner of /opt/keypass files #193
Merged
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.
Previous versions of keypass (1.9.0 and below) had all files in
/opt/keypass
belong to UID 1000. This made it possible to run the container with an unprivileged user (UID 1000).Version 1.11.0 dropped the
chown
from the Dockerfile and had all files in/opt/keypass
owned by root. Since thekeypass-entrypoint.sh
performs some inline changes withsed -i
in/opt/keypass/config.yml
, it requires keypass to be run as root (UID 0).Changing the security profile impacts on the policies in container orchestration environments such as openshift. We could modify our security policies, but believe that actually keypass can run as un unprivileged user just fine, as long as it is the owner of the /
opt/keypass
folder and subfolders.This PR restores ownership of the
/opt/keypass
folder to UID 1000, keeping backward compatibility with the security policy configured for keypass 1.9.0.