-
Notifications
You must be signed in to change notification settings - Fork 24
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: socket file permission #55
Conversation
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
- Coverage 91.72% 91.62% -0.10%
==========================================
Files 11 11
Lines 749 752 +3
==========================================
+ Hits 687 689 +2
- Misses 62 63 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# from writing to it if the APISIX is run under root. | ||
os.chmod(self.fd, 0o766) | ||
if os.stat(self.fd).st_mode & 0xfff != 0o766: | ||
raise Exception("can't change mode for unix socket permission to 766") |
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.
Could you update the CI configuration so the e2e test can pass?
We need to adjust the port of Admin API.
OK, I'll finish it soon.
获取 Outlook for iOS<https://aka.ms/o0ukef>
________________________________
发件人: 罗泽轩 ***@***.***>
发送时间: Sunday, September 18, 2022 8:08:27 PM
收件人: apache/apisix-python-plugin-runner ***@***.***>
抄送: Young ***@***.***>; Author ***@***.***>
主题: Re: [apache/apisix-python-plugin-runner] fix: socket file permission (PR #55)
@spacewander commented on this pull request.
________________________________
In apisix/runner/server/server.py<#55 (comment)>:
@@ -84,6 +84,12 @@ def __init__(self, config: NewServerConfig):
self.sock.bind(self.fd)
self.sock.listen(1024)
+ # the default socket permission is 0755, which prevents the 'nobody' worker process
+ # from writing to it if the APISIX is run under root.
+ os.chmod(self.fd, 0o766)
+ if os.stat(self.fd).st_mode & 0xfff != 0o766:
+ raise Exception("can't change mode for unix socket permission to 766")
Could you update the CI configuration so the e2e test can pass?
We need to adjust the port of Admin API.
―
Reply to this email directly, view it on GitHub<#55 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALRIROF4QP6MSOGRG3XS3ALV64A3XANCNFSM6AAAAAAQOA3XPE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Maybe we can deal with codecov in the next PR? |
fix: #53
changes:
cc @spacewander