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

Log permission denied issue when trying to get started #1644

Closed
MadLittleMods opened this issue Dec 16, 2020 · 1 comment · Fixed by #1799
Closed

Log permission denied issue when trying to get started #1644

MadLittleMods opened this issue Dec 16, 2020 · 1 comment · Fixed by #1799
Assignees

Comments

@MadLittleMods
Copy link
Contributor

Running through the "get started" section in the readme on a fresh macbook results in a permission error when it tries to write some logs.

$ ./bin/dendrite-monolith-server --tls-cert server.crt --tls-key server.key --config dendrite.yaml
FATA[2020-12-16T06:39:03.379411000Z] [github.com/matrix-org/dendrite/internal/log.go:155] setupFileHook
Couldn't create directory /var/log/dendrite: "mkdir /var/log/dendrite: permission denied"

It seems necessary to use sudo when launching Dendrite to get it to work out of the box.

Can the log directory be configured?

Yes, this can be configured in your dendrite.yaml config under logging

Potential solutions

  1. Update the readme instructions to note about changing the config for logging in addition to the server_name
  2. Update the log directory to default somewhere with permissions like in the project itself.
@kegsay
Copy link
Member

kegsay commented Mar 17, 2021

We really shouldn't be using /var/log at all as a log location imo. ./logs would be better since we'll be more likely to be able to write to it.

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

Successfully merging a pull request may close this issue.

2 participants