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

Mode parameter for listeners only supports decimal #16302

Open
matrixbot opened this issue Dec 21, 2023 · 0 comments
Open

Mode parameter for listeners only supports decimal #16302

matrixbot opened this issue Dec 21, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 21, 2023

This issue has been migrated from #16302.


Description

When setting a mode in the listener config when listening on a unix domain socket, the mode needs to be specified in decimal. That isn't very obvious from the documentation: https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#listeners

The documentation says it defaults to 666, however it actually defaults to 0o666 or rather 438. This leads the reader to believe they can specify a different mode like 660, however they would need to specify 432. Specifying octal does not work with the yaml parser synapse uses (0o660 is parsed as a string).

It would be good if the documentation mentioned that or required the mode to be passed as a string.

Steps to reproduce

  • setup a listener on a unix domain socket with a non-default mode. It will have the wrong values when checking the permissions of the created socket, if the value is passed as a decimal number, but is actually octal.

Homeserver

neko.dev

Synapse Version

1.92.0_rc1

Installation Method

Other (please mention below)

Database

postgres, one db

Workers

Multiple workers

Platform

Gentoo

Configuration

No response

Relevant log output

s-w--w-r-T 1 synapse synapse 0 Sep 11 16:56 /run/synapse/event_creator.replication.sock

when mode 660 is specified.



### Anything else that would be useful to know?

_No response_
@matrixbot matrixbot changed the title Dummy issue Mode parameter for listeners only supports decimal Dec 22, 2023
@matrixbot matrixbot reopened this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant