Skip to content

feat: add an environment var to skip the find-and-chown#198

Open
erral wants to merge 1 commit into6.1.xfrom
erral-find-and-chown
Open

feat: add an environment var to skip the find-and-chown#198
erral wants to merge 1 commit into6.1.xfrom
erral-find-and-chown

Conversation

@erral
Copy link
Member

@erral erral commented Jan 20, 2026

  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

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-chown thing, 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

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

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)

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.

2 participants