fix: rootless support for Alpine container image#123
Open
slauger wants to merge 2 commits intoOpenVoxProject:mainfrom
Open
fix: rootless support for Alpine container image#123slauger wants to merge 2 commits intoOpenVoxProject:mainfrom
slauger wants to merge 2 commits intoOpenVoxProject:mainfrom
Conversation
The FileUtils.chown calls in openvoxserver-ca fail in rootless containers because the process lacks CAP_CHOWN. The directory ownership is already handled correctly by the g=u / SGID permission pattern. This is the same approach used in the openvox-operator project. Ref: OpenVoxProject#121
The foreground script uses 'install --owner --group' to create the restartcounter file, which requires CAP_CHOWN. Replace with touch + chmod which works without elevated capabilities.
2d68854 to
8af527d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
FileUtils.chowncalls inopenvoxserver-cagem — these fail in rootless containers because the process lacksCAP_CHOWN. The directory ownership is already handled correctly by theg=u/ SGID permission pattern.foregroundscript to usetouch + chmodinstead ofinstall --owner --groupfor the restartcounter file, which also requiresCAP_CHOWN.Both patches are the same approach used in the openvox-operator.
Tested on Linux with podman and bind-mounted CA directory — container starts successfully.
Note: When bind-mounting the CA directory with podman rootless, users need to ensure the directory is writable by the container user, e.g. using the
:Uvolume flag.Ref: #121