Skip to content
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(core): set correct permissions for socket path when umask is set to 0027 #14084

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tzssangglass
Copy link
Member

@tzssangglass tzssangglass commented Jan 6, 2025

Summary

When umask is configured to 0027, the newly created kong_config.socket_path directory inherits permissions 750, which restricts access for worker processes. This commit ensures that the socket_path directory is explicitly set to permissions 755 using chmod 755, thereby preventing permission-related errors and allowing proper access for all necessary processes.

Checklist

Issue reference

Fix: FTI-6298

…to `0027`

When umask is configured to `0027`, the newly created `kong_config.socket_path` directory inherits permissions `750`,
which restricts access for worker processes. This commit ensures that the `socket_path` directory is explicitly set
to permissions `755` using `chmod 755`, thereby preventing permission-related errors and allowing proper access for
all necessary processes.

Fix: [FTI-6298](https://konghq.atlassian.net/browse/FTI-6298)
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Comment on lines +513 to +514
local success = pl_utils.executeex("chmod 755 " .. kong_config.socket_path)
if not success then
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
local success = pl_utils.executeex("chmod 755 " .. kong_config.socket_path)
if not success then
ok = pl_utils.executeex("chmod 755 " .. kong_config.socket_path)
if not ok then

Also executeex returns stderr, should we handle it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants