thread 'main' panicked at 'config is valid: SledError (Permission denied) #98

Closed
opened 2021-06-18 16:12:50 +00:00 by nathanfranke · 2 comments
nathanfranke commented 2021-06-18 16:12:50 +00:00 (Migrated from gitlab.com)

I am using the Docker build/run instructions: https://gitlab.com/famedly/conduit/-/blob/master/docker/README.md

However, when I run the image, I get this error:

server@server:~$ docker run -d -v ~/conduit.toml:/srv/conduit/conduit.toml -v db:/srv/conduit/.local/share/conduit matrixconduit/matrix-conduit:latest
19a7972a48c158db236b09ae8454bd11963ab0eb8ca7918b970e64f2e51c4b0c
server@server:~$ docker logs -ft 19a7972a48c158db236b09ae8454bd11963ab0eb8ca7918b970e64f2e51c4b0c
2021-06-18T16:07:14.847568777Z thread 'main' panicked at 'config is valid: SledError { source: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" }) }', src/main.rs:202:10
2021-06-18T16:07:14.847891742Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

My conduit.toml is the default, with my server_name replaced.

Note: I omitted the port flag since I already have a reverse proxy running, but that shouldn't cause this bug.

I am using the Docker build/run instructions: https://gitlab.com/famedly/conduit/-/blob/master/docker/README.md However, when I run the image, I get this error: ``` server@server:~$ docker run -d -v ~/conduit.toml:/srv/conduit/conduit.toml -v db:/srv/conduit/.local/share/conduit matrixconduit/matrix-conduit:latest 19a7972a48c158db236b09ae8454bd11963ab0eb8ca7918b970e64f2e51c4b0c server@server:~$ docker logs -ft 19a7972a48c158db236b09ae8454bd11963ab0eb8ca7918b970e64f2e51c4b0c 2021-06-18T16:07:14.847568777Z thread 'main' panicked at 'config is valid: SledError { source: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" }) }', src/main.rs:202:10 2021-06-18T16:07:14.847891742Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` My `conduit.toml` is the default, with my `server_name` replaced. Note: I omitted the port flag since I already have a reverse proxy running, but that shouldn't cause this bug.
Weasy commented 2021-06-19 11:32:48 +00:00 (Migrated from gitlab.com)

I think you need to change this line in your conduit.toml

- database_path = "/var/lib/conduit/conduit.db"
+ database_path = "/srv/conduit/.local/share/conduit/conduit.db"

I guess the container user does not have access permissions for the directory /var/lib/conduit/, so you need to change the database_path to a directory it can access, and that is /srv/conduit/.local/share/conduit/ or should also be everything in /srv/conduit/.

I hope this solves your problem.

I think you need to change this line in your `conduit.toml` ```diff - database_path = "/var/lib/conduit/conduit.db" + database_path = "/srv/conduit/.local/share/conduit/conduit.db" ``` I guess the container user does not have access permissions for the directory `/var/lib/conduit/`, so you need to change the `database_path` to a directory it can access, and that is `/srv/conduit/.local/share/conduit/` or should also be everything in `/srv/conduit/`. I hope this solves your problem.
nathanfranke commented 2021-06-19 18:11:09 +00:00 (Migrated from gitlab.com)

It looks like this solved it for me. Thank you! I am closing, but it would be nice to have a note in the docker README or a more descriptive error.

It looks like this solved it for me. Thank you! I am closing, but it would be nice to have a note in the docker README or a more descriptive error.
Sign in to join this conversation.
No labels
Android
CS::needs customer feedback
CS::needs follow up
CS::needs on prem installation
CS::waiting
Chrome
Design:: Ready
Design:: in progress
Design::UX
E2EE
Edge
Firefox
GDPR
Iteration 13 IM
Linux
MacOS
Need::Discussion
Need::Steps to reproduce
Need::Upstream fix
Needs:: Planning
Needs::Dev-Team
Needs::More information
Needs::Priority
Needs::Product
Needs::Refinement
Needs::Severity
Priority::1-Critical
Priority::2-Max
Priority::3-Impending
Priority::4-High
Priority::5-Medium
Priority::6-Low
Priority::7-None
Progress::Backlog
Progress::Review
Progress::Started
Progress::Testing
Progress::Triage
Progress::Waiting
Reporter::Sentry
Safari
Target::Community
Target::Customer
Target::Internal
Target::PoC
Target::Security
Team:Customer-Success
Team:Design
Team:Infrastructure
Team:Instant-Messaging
Team:Product
Team:Workflows
Type::Bug
Type::Design
Type::Documentation
Type::Feature
Type::Improvement
Type::Support
Type::Tests
Windows
blocked
blocked-by-spec
cla-signed
conduit
contribution::advanced
contribution::easy
contribution::help needed
from::review
iOS
p::ti-tenant
performance
product::triage
proposal
refactor
release-blocker
s: dart_openapi_codegen
s::Famedly-Patient
s::Org-Directory
s::Passport-Generator
s::Requeuest
s:CRM
s:Famedly-App
s:Famedly-Web
s:Fhiroxide
s:Fhiroxide-cli
s:Fhiroxide-client
s:Fhirs
s:Hedwig
s:LISA
s:Matrix-Dart-SDK
s:Role-Manager
s:Synapse
s:User-Directory
s:WFS-Matrix
s:Workflow Engine
s:dtls
s:famedly-error
s:fcm-shared-isolate
s:matrix-api-lite
s:multiple-tab-detector
s:native-imaging
severity::1
severity::2
severity::3
severity::4
technical-debt
voip
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Matthias/conduit#98
No description provided.