Skip to content

PostgreSQL fails to start: [Errno 13] Permission denied setuser #25

@jrjparks

Description

@jrjparks

Not sure if anyone else has this issue but, using the latest image, postgresql fails to start. Any help will be appreciated.

Note item two of the docker top output._

/usr/bin/runsvdir -P /etc/service log: : [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied

docker run

$ docker run -d --name="postgresql" -p 127.0.0.1:5432:5432 -v /tmp/postgresql:/data -e USER="super" -e DB="database_name" -e PASS="$(pwgen -s -1 16)" paintedfox/postgresql

docker logs

$ docker logs postgresql

*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 9
POSTGRES_USER=super
POSTGRES_PASS=nlMU71xfRsejnrbn
POSTGRES_DATA_DIR=/data
POSTGRES_DB=database_name
Starting PostgreSQL...
POSTGRES_USER=super
POSTGRES_PASS=nlMU71xfRsejnrbn
POSTGRES_DATA_DIR=/data
POSTGRES_DB=database_name
Starting PostgreSQL...
POSTGRES_USER=super
POSTGRES_PASS=nlMU71xfRsejnrbn
POSTGRES_DATA_DIR=/data
POSTGRES_DB=database_name
Starting PostgreSQL...
POSTGRES_USER=super
POSTGRES_PASS=nlMU71xfRsejnrbn
POSTGRES_DATA_DIR=/data
POSTGRES_DB=database_name
Starting PostgreSQL...

docker top

$ docker top postgresql

root                20549               19271               2                   15:46               ?                   00:00:00            /usr/bin/python3 -u /sbin/my_init
root                20578               20549               0                   15:46               ?                   00:00:00            /usr/bin/runsvdir -P /etc/service log: : [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied setuser: cannot execute /usr/lib/postgresql/9.3/bin/postgres: [Errno 13] Permission denied
root                20579               20578               0                   15:46               ?                   00:00:00            runsv postgresql
root                20580               20578               0                   15:46               ?                   00:00:00            runsv syslog-ng
root                20581               20578               0                   15:46               ?                   00:00:00            runsv cron
root                20584               20581               0                   15:46               ?                   00:00:00            /usr/sbin/cron -f
root                20591               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20593               20591               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20594               20580               0                   15:46               ?                   00:00:00            syslog-ng -F -p /var/run/syslog-ng.pid --no-caps
root                20600               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20602               20600               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20607               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20608               20607               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20614               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20616               20614               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20621               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20622               20621               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20628               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20630               20628               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20641               20549               0                   15:46               ?                   00:00:00            /bin/bash ./run
root                20642               20641               0                   15:46               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20648               20549               0                   15:47               ?                   00:00:00            /bin/bash ./run
root                20649               20648               0                   15:47               ?                   00:00:00            inotifywait -q -e create /run/postgresql/
root                20655               20549               0                   15:47               ?                   00:00:00            /bin/bash ./run
root                20656               20655               0                   15:47               ?                   00:00:00            inotifywait -q -e create /run/postgresql/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions