-
Notifications
You must be signed in to change notification settings - Fork 834
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
fix(ownership): change Kong permissions to be kong:root #632
base: master
Are you sure you want to change the base?
Conversation
da8e75d
to
2819a1c
Compare
98732de
to
d55ca5a
Compare
@gszr I updated the old PR, can you have a look? |
&& mkdir -p "${KONG_PREFIX}" \ | ||
&& chown -R kong:0 ${KONG_PREFIX} \ | ||
&& chown kong:0 /usr/local/bin/kong \ | ||
&& chown -R root:kong ${KONG_PREFIX} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tieske Is there more context on the motivation for this change? IIRC, the owner of kong files was changed to kong
fairly recently, so I am afraid of changing it back to root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original pr by Colin; Changing the ownership to root but giving the Kong user access prevents the Kong user from modifying the files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally, everything under a common shared path like /usr/local/lib
, /usr/local/share
should always be owned by root:root
because technically other packages will also write to it. this applies to also /etc/kong/kong.conf; only
/usr/local/kong (and /usr/local/openresty, if we mark our package a conflict with openresty
) should be owned by
kong:kong
. (well, technically, even under /usr/local/kong
, subdirs like /usr/local/kong/lib
, /usr/local/kong/include` should be owned by root:root as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The course of action is IMO:
- Consolidate what the permissions should be (I tend to agree with most of what @fffonion said)
- Move permission-related code to post-install scripts (alpine is an exception since it's not really a distro package) as suggested by Wangchong. I cannot remember of any particular issues around this explaining why they were placed in the docker images only.
file permission of deb and rpm should be set by |
@fffonion not sure what you're saying. What needs to change about this PR? all should be |
@Tieske sry was typing on phone. i was mentioning to move the and beside of that, me and @gszr both agree that most files we shipped should be owned by |
Could this break custom plugin installs attempted with the |
replaces #546