Permission Problems with persistent Docker Volumes stored at ./

I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue

Hey guys,

I am trying to setup Passbolt CE using the following tutorial without any problems on my VPS mashine which is running Ubuntu 2204 with Docker and Docker Compose.
:point_right:t2: Passbolt Help | Docker passbolt installation

So far so good - this all worked perfctly fine!

What I am now trying to achieve is, having the persistent volumes database/ gpg-volume/ jwt-volume/ stored inside my Passbolt folder located here:

Having all docker volumes inside my personal docker folder is kinda part of my personal backup strategy. I like having everything in place and handy.

My docker compose file looks like this. Nothing big changed so far, just the persistent volumes at ./.

version: "3.9"
    image: mariadb:10.11
    restart: unless-stopped
      MYSQL_DATABASE: "passbolt"
      MYSQL_USER: "passbolt"
      MYSQL_PASSWORD: "P4ssb0lt"
      - ./database:/var/lib/mysql

    image: passbolt/passbolt:4.1.0-1-ce
    #Alternatively you can use rootless:
    #image: passbolt/passbolt:latest-ce-non-root
    restart: unless-stopped
      - db
      - ./gpg-volume:/etc/passbolt/gpg
      - ./jwt-volume:/etc/passbolt/jwt
      - 8084:80
      - 4434:443
    #Alternatively for non-root images:
    # - 80:8080
    # - 443:4433


Unfortunately, I get the following error when starting the containers.
-bash: line 1: /etc/passbolt/gpg/serverkey_private.asc: Permission denied

The folders for the persistent volumes where created but I don’t really know if the permissions are set correctly.

Any help will be highly appreciated.

Best regards

Hey frens, really nobody? Is there anything more that I can provide to get some help? I just want to store the persistent docker volumes inside my passbolt folder. Any help will be highly appreciated.

Best, Daniel

This is most likely the easiest way to determine the correct permissions:

  1. Do a chmod 777 gpg-volume jwt-volume NOTE: This is TEMPORARY!
  2. Restart the container, everything should work now and the files in the volumes should be created.
  3. Stop the container and check the owner of the files in the directories.
  4. Do a chown <user>:<group> <directory> with the same user:group as the created files.
  5. Afterwards do a chmod 755 gpg-volume jwt-volume to restore the default permissions.
  6. Finally restart the container and everything should keep working.

Hope this helps.

Hey there, thanks for getting back. I am not in front of my mashine right now, but will work myself through your steps later tonight.


I think jwt and gpg directories are owned by www-data user.

There is chances www-data user doesn’t exists on your host so the chown step will fail with unknown user error.

Inside the passbolt container, www-data userid should be 33.

$ id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)

Even if www-data doesn’t exists in your system, you can use chown with userid:groupid:

chown -R 33:33 gpg_directory

You must use the same id than in the container.

Hope this helps.

Thanks @TheReptile and @AnatomicJC for getting back. Your approaches brought me to the solution.

I inspected, where the default docker compose installation was storing the docker volumes. The mount path for gpg_volume/ and jwt_volume/ is here:

I than easily identified the permissions set by the default docker compose installation on these volumes (drwxrwx--- root www-data) and applied the same to my volumes stored inside my passbolt installation folder:

like this:
sudo chmod 770 gpg-volume/ jwt-volume/ && sudo chown root:www-data gpg-volume/ jwt-volume/

Passbolt installation now went through easily and the persistent volumes are stored inside my passbolt folder. :grin: