fix(customize) sets permissions in line with Kong install#526
Draft
Tieske wants to merge 1 commit into
Draft
Conversation
Tieske
commented
Dec 15, 2021
| %s | ||
|
|
||
| # set ownership to kong user/group | ||
| find /usr/local/share/lua/5.1/ -type f -exec chown 1000:1000 "{}" + |
Contributor
Author
There was a problem hiding this comment.
@gszr maybe this can be changed to chown kong:kong. wdyt?
Contributor
There was a problem hiding this comment.
instead of assuming 1000:1000 can we get the uid:gid with the id command?
Contributor
Author
There was a problem hiding this comment.
so I tried this:
KUSR=$(id -u kong)
KGRP=$(id -g kong)
find /usr/local/share/lua/5.1/ -type f -exec chown $KUSR:$KGRP "{}" +
find /usr/local/share/lua/5.1/ -type d -exec chown $KUSR:$KGRP "{}" +
But the result is
/usr/local/share/lua/5.1 $ ls -l
total 344
-rw-r--r-- 1 kong nogroup 29426 Dec 15 18:19 MessagePack.lua
-rw-r--r-- 1 kong nogroup 2788 Dec 15 18:19 ansicolors.lua
-rw-r--r-- 1 kong nogroup 12069 Dec 15 18:19 binaryheap.lua
drwxr-xr-x 1 kong nogroup 4096 Dec 17 19:24 cassandra
-rw-r--r-- 1 kong nogroup 32158 Dec 15 18:19 date.lua
-rw-r--r-- 1 kong nogroup 10591 Dec 15 18:19 etlua.lua
-rw-r--r-- 1 kong nogroup 10167 Dec 15 18:19 ffi-zlib.lua
-rw-r--r-- 1 kong nogroup 9543 Dec 15 18:19 inspect.lua
Which I find weird, originally it was;
/usr/local/share/lua/5.1 $ ls -l
total 296
-rw-r--r-- 1 1000 1000 29426 Dec 15 18:19 MessagePack.lua
-rw-r--r-- 1 1000 1000 2788 Dec 15 18:19 ansicolors.lua
-rw-r--r-- 1 1000 1000 12069 Dec 15 18:19 binaryheap.lua
drwxr-xr-x 2 1000 1000 4096 Dec 17 19:24 cassandra
-rw-r--r-- 1 1000 1000 32158 Dec 15 18:19 date.lua
-rw-r--r-- 1 1000 1000 10591 Dec 15 18:19 etlua.lua
-rw-r--r-- 1 1000 1000 10167 Dec 15 18:19 ffi-zlib.lua
-rw-r--r-- 1 1000 1000 9543 Dec 15 18:19 inspect.lua
Using the id command on alpine gives me this:
/usr/local/share/lua/5.1 $ id -u kong
100
/usr/local/share/lua/5.1 $ id -g kong
65533
Not sure where we do it, but seems we set the ownership to 1000:1000, and not to kong:kong in the original docker builds.
So how should this customize behave?
Tieske
marked this pull request as draft
July 26, 2022 21:43
Contributor
Contributor
Author
|
needs updating after #632 gets merged |
Contributor
|
Closing this due to lack of activity. Please re-open if needed. |
Contributor
Author
|
This is still needed. It's just that #632 has been a moving target, so that needs fixing first |
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.
When using the
customizefeature, anything installed will be owned byroot. This updates the files to be identically owned as the original Kong installed plugins.Here's after a customize run (the readme example), installing 2 plugins: