-
Notifications
You must be signed in to change notification settings - Fork 21
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
Make Unix sockets writable for user group #56
base: main
Are you sure you want to change the base?
Conversation
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.
Should we add a feature flag for this?
The try/finally clause that was requested has been added. I don't see the need for a feature flag to enable this behavior, I believe making sockets group-writable is a sane default. |
While I agree with you, this code removes the ability of users to control the umask themselves for this socket, so it's worth thinking about. |
Modified the call signature Server.create_server_socket to accept socket_permissions as an optional parameter. get_socket_umask will return the default umask of `0o002` when called with no explicit permissions.
Apologies for the lack of updates for a while. I just implemented the config option |
When Mopidy is run as a system service under the
mopidy
user, Unix sockets are currently created with a umask of022
, which makes other users unable to connect due to having no write permission. This PR ensures Unix sockets are created with a umask of002
, making them writable to users in themopidy
group and thus usable to users added to this group.