feat: add an environment var to skip the find-and-chown#198
Open
feat: add an environment var to skip the find-and-chown#198
Conversation
davisagli
reviewed
Feb 10, 2026
Member
There was a problem hiding this comment.
I think the main reason we have this command here at all is because when a new volume is mounted in Docker, it starts out owned by the host user rather than the container's plone user. So, this is a bit of a hack to make sure a new site can be created with the correct permissions after a new volume is mounted.
With that in mind: what if we changed it to only do the recursive find-and-chown if the top-level /data folders are not already owned by plone. Then it should still solve the problem with initializing the volume, but it won't re-run it on every startup.
I don't have a big problem with the environment variable, but:
- it seems like we could make this smart enough that it isn't necessary
- if we do add it, it should be documented (oh, I see there's a linked PR for that)
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.
If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.
Addresses #172
I don't know whether this is acceptable at all, but we are creating our base docker images for Plone that do not do this
find-and-chownthing, because we run Plone with ZEO as storage, and when you have a log of blobs it takes a lot of time to start.That's why I decided to add an environment var, that if set, avoids doing the find-and-chown thing.
I have added the documentation in the documentation repo: plone/documentation#2035