[GH-ISSUE #394] Wrong Permissions: /etc/ssl/private/ssl-cert-snakeoil.key blocked container start #203

Closed
opened 2026-02-26 10:30:57 +03:00 by kerem · 5 comments
Owner

Originally created by @geraldurbas on GitHub (Dec 5, 2021).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/394

  • Starting PostgreSQL 12 database server * Error: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -D /var/lib/postgresql/12/main -l /var/log/postgresql/postgresql-12-main.log -s -o -c config_file="/etc/postgresql/12/main/postgresql.conf" exited with status 1:

2021-12-05 11:44:23.305 UTC [141] FATAL: could not load private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

2021-12-05 11:44:23.305 UTC [141] LOG: database system is shut down

Had to:
chmod 400 /etc/ssl/private/ssl-cert-snakeoil.key

Just pulled the image from via docker

Originally created by @geraldurbas on GitHub (Dec 5, 2021). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/394 * Starting PostgreSQL 12 database server * Error: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -D /var/lib/postgresql/12/main -l /var/log/postgresql/postgresql-12-main.log -s -o -c config_file="/etc/postgresql/12/main/postgresql.conf" exited with status 1: 2021-12-05 11:44:23.305 UTC [141] FATAL: could not load private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied 2021-12-05 11:44:23.305 UTC [141] LOG: database system is shut down Had to: `chmod 400 /etc/ssl/private/ssl-cert-snakeoil.key` Just pulled the image from via docker
kerem closed this issue 2026-02-26 10:30:57 +03:00
Author
Owner

@ShockwaveNN commented on GitHub (Dec 5, 2021):

I think we mention about this in README if this is your own cert

chmod 400 /app/onlyoffice/DocumentServer/data/certs/tls.key

I don't know what's the file /etc/ssl/private/ssl-cert-snakeoil.key

So maybe something wrong with your docker run command and you've mounted your host system certs?

<!-- gh-comment-id:986217082 --> @ShockwaveNN commented on GitHub (Dec 5, 2021): I think we mention about this in [README](https://github.com/ONLYOFFICE/Docker-DocumentServer#installation-of-the-ssl-certificates) if this is your own cert > chmod 400 /app/onlyoffice/DocumentServer/data/certs/tls.key I don't know what's the file `/etc/ssl/private/ssl-cert-snakeoil.key` So maybe something wrong with your docker run command and you've mounted your host system certs?
Author
Owner

@geraldurbas commented on GitHub (Dec 5, 2021):

I configured SSL_CERTIFICATE_PATH and SSL_KEY_PATH
Dont know why PG is refering the snake oil certs...

Maybe an error in postgres:9.5 image...

<!-- gh-comment-id:986220214 --> @geraldurbas commented on GitHub (Dec 5, 2021): I configured SSL_CERTIFICATE_PATH and SSL_KEY_PATH Dont know why PG is refering the snake oil certs... Maybe an error in postgres:9.5 image...
Author
Owner

@ShockwaveNN commented on GitHub (Dec 5, 2021):

Maybe an error in postgres:9.5 image...

By default, we got integrated postgres in our default image

So to able to figure out your error we need exact step-by-step guide how to reproduce it

<!-- gh-comment-id:986220927 --> @ShockwaveNN commented on GitHub (Dec 5, 2021): > Maybe an error in postgres:9.5 image... By default, we got integrated postgres in our default image So to able to figure out your error we need exact step-by-step guide how to reproduce it
Author
Owner

@geraldurbas commented on GitHub (Dec 5, 2021):

The (quite old) Docker lived on a strange NAS Linux ... Guess its related to that.
Tested it on updated Ubuntu 20.04 and cant reproduce it there

<!-- gh-comment-id:986282457 --> @geraldurbas commented on GitHub (Dec 5, 2021): The (quite old) Docker lived on a strange NAS Linux ... Guess its related to that. Tested it on updated Ubuntu 20.04 and cant reproduce it there
Author
Owner

@ShockwaveNN commented on GitHub (Dec 6, 2021):

The (quite old) Docker lived on a strange NAS Linux

Yep, this may be a reason
Thanks for clarification

<!-- gh-comment-id:986492357 --> @ShockwaveNN commented on GitHub (Dec 6, 2021): > The (quite old) Docker lived on a strange NAS Linux Yep, this may be a reason Thanks for clarification
Sign in to join this conversation.
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
starred/Docker-DocumentServer-ONLYOFFICE#203
No description provided.