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

cannot create /init/initdb.sql: Permission denied #6

Open
phatpaul opened this issue Oct 13, 2022 · 1 comment
Open

cannot create /init/initdb.sql: Permission denied #6

phatpaul opened this issue Oct 13, 2022 · 1 comment

Comments

@phatpaul
Copy link

guacamole-init-guacamole-db-1 | /bin/sh: 1: cannot create /init/initdb.sql: Permission denied

I tried adding :rw to the volume, but no luck:

version: "3"
services:

  init-guacamole-db:
    image: guacamole/guacamole:latest
    command: ["/bin/sh", "-c", "test -e /init/initdb.sql && echo 'init file already exists' || /opt/guacamole/bin/initdb.sh --postgres > /init/initdb.sql" ]
    volumes:
      - dbinit:/init:rw
@phatpaul phatpaul changed the title guacamole-init-guacamole-db-1 | /bin/sh: 1: cannot create /init/initdb.sql: Permission denied cannot create /init/initdb.sql: Permission denied Oct 13, 2022
@phatpaul
Copy link
Author

FYI I got around it by adding user: 0:0 to docker-compose. Not sure it's the best approach, but it worked.

version: "3"
services:

  init-guacamole-db:
    image: guacamole/guacamole:latest
    user: 0:0
    command: ["/bin/sh", "-c", "test -e /init/initdb.sql && echo 'init file already exists' || /opt/guacamole/bin/initdb.sh --postgres > /init/initdb.sql" ]
    volumes:
      - dbinit:/init:z

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

No branches or pull requests

1 participant