-
Notifications
You must be signed in to change notification settings - Fork 144
Remove chown/chmod from entrypoint #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ah, thanks @wohali as usual you are a few steps ahead of me on this topic. I noticed that @yosifkit recently went through a bunch of official images and started doing a conditional chown in the entrypoint of only the files that were not already owned by the appropriate user. See e.g. redis/docker-library-redis#166. I think the original idea came from docker-library/postgres#143 where it was credited with a big savings in startup time. Seems like we could at least adopt this change without any regrets ... |
I also think we should probably set |
Another issue with the data directory is that the files created by CouchDB itself are not following the permissions indicated here in the entrypoint. CouchDB is creating files with 644 and directories with 755. I guess one could with |
As mentioned here
@kocolosk here's my thinking on the above:
I believe we had this in there because, if you are mounting an external volume, you might have all the files owned by the wrong user and CouchDB simply wouldn't operate. This is frightfully common.
I suspect if we remove this, we'll start getting bugs about how CouchDB can't read/write its data.
We could have the entryfile (or CouchDB!) complain if it can't read/write to that folder, would that be sufficient?
The point of this I believe was to ensure that externally mounted volumes were correctly not allowing access to the data directory from anyone other than the couchdb user and group. Similar problem to the issue above.
These were probably intended to ensure that the group could write to those files as well, but I suspect this can go. Why these are xx4 and xx5 instead of xx0, being inconsistent with
/opt/couchdb/data
, I don't know./cc @kocolosk @denyeart
The text was updated successfully, but these errors were encountered: