Permission denied: '/home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der' #2203

Closed
opened 2025-10-09 17:50:32 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @LukasWerfel on GitHub.

All of the sudden bitwarden cannot be upped anymore.

[user]$ docker-compose up -d
Building standardnotes
Traceback (most recent call last):
  File "site-packages/docker/utils/build.py", line 96, in create_archive
PermissionError: [Errno 13] Permission denied: '/home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 127, in perform_command
  File "compose/cli/main.py", line 1080, in up
  File "compose/cli/main.py", line 1076, in up
  File "compose/project.py", line 475, in up
  File "compose/service.py", line 358, in ensure_image_exists
  File "compose/service.py", line 1082, in build
  File "site-packages/docker/api/build.py", line 154, in build
  File "site-packages/docker/utils/build.py", line 31, in tar
  File "site-packages/docker/utils/build.py", line 100, in create_archive
OSError: Can not read file in context: /home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der
[23602] Failed to execute script docker-compose
[user@localhost server]$ SUDO ^C
[user@localhost server]$ sudo systemctl restart docker
[user@localhost server]$ docker-compose up -d
Building standardnotes
Traceback (most recent call last):
  File "site-packages/docker/utils/build.py", line 96, in create_archive
PermissionError: [Errno 13] Permission denied: '/home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 127, in perform_command
  File "compose/cli/main.py", line 1080, in up
  File "compose/cli/main.py", line 1076, in up
  File "compose/project.py", line 475, in up
  File "compose/service.py", line 358, in ensure_image_exists
  File "compose/service.py", line 1082, in build
  File "site-packages/docker/api/build.py", line 154, in build
  File "site-packages/docker/utils/build.py", line 31, in tar
  File "site-packages/docker/utils/build.py", line 100, in create_archive
OSError: Can not read file in context: /home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der
[23789] Failed to execute script docker-compose

My compose file

Problem remains after using a backuped volume that previously worked.

Originally created by @LukasWerfel on GitHub. All of the sudden bitwarden cannot be upped anymore. ``` [user]$ docker-compose up -d Building standardnotes Traceback (most recent call last): File "site-packages/docker/utils/build.py", line 96, in create_archive PermissionError: [Errno 13] Permission denied: '/home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "bin/docker-compose", line 6, in <module> File "compose/cli/main.py", line 71, in main File "compose/cli/main.py", line 127, in perform_command File "compose/cli/main.py", line 1080, in up File "compose/cli/main.py", line 1076, in up File "compose/project.py", line 475, in up File "compose/service.py", line 358, in ensure_image_exists File "compose/service.py", line 1082, in build File "site-packages/docker/api/build.py", line 154, in build File "site-packages/docker/utils/build.py", line 31, in tar File "site-packages/docker/utils/build.py", line 100, in create_archive OSError: Can not read file in context: /home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der [23602] Failed to execute script docker-compose [user@localhost server]$ SUDO ^C [user@localhost server]$ sudo systemctl restart docker [user@localhost server]$ docker-compose up -d Building standardnotes Traceback (most recent call last): File "site-packages/docker/utils/build.py", line 96, in create_archive PermissionError: [Errno 13] Permission denied: '/home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "bin/docker-compose", line 6, in <module> File "compose/cli/main.py", line 71, in main File "compose/cli/main.py", line 127, in perform_command File "compose/cli/main.py", line 1080, in up File "compose/cli/main.py", line 1076, in up File "compose/project.py", line 475, in up File "compose/service.py", line 358, in ensure_image_exists File "compose/service.py", line 1082, in build File "site-packages/docker/api/build.py", line 154, in build File "site-packages/docker/utils/build.py", line 31, in tar File "site-packages/docker/utils/build.py", line 100, in create_archive OSError: Can not read file in context: /home/user/server-setup/server/volumes/bitwarden/data/rsa_key.der [23789] Failed to execute script docker-compose ``` [My compose file](https://github.com/LukasWerfel/server-setup/blob/master/server/docker-compose.yml) Problem remains after using a backuped volume that previously worked.
Author
Owner

@dani-garcia commented on GitHub:

There hasn't been any change to that recently, so I'm not sure why it would break now.

Can you check the permission of that file, to see if you can access it correctly?

You could also try deleting all the rsa_key.* files, they'll be regenerated at next start, but you'll have to login again with all the clients.

@dani-garcia commented on GitHub: There hasn't been any change to that recently, so I'm not sure why it would break now. Can you check the permission of that file, to see if you can access it correctly? You could also try deleting all the rsa_key.* files, they'll be regenerated at next start, but you'll have to login again with all the clients.
Author
Owner

@jonahbron commented on GitHub:

Found the issue. I wasn't taking into account the ReadWritePaths set in my systemd service. Once I moved my data dir into that path it worked fine.

@jonahbron commented on GitHub: Found the issue. I wasn't taking into account the `ReadWritePaths` set in my systemd service. Once I moved my data dir into that path it worked fine.
Author
Owner

@LukasWerfel commented on GitHub:

Hi, turns out it was not a bitwarden specific issue, thanks for your help!

@LukasWerfel commented on GitHub: Hi, turns out it was not a bitwarden specific issue, thanks for your help!
Author
Owner

@jonahbron commented on GitHub:

@LukasWerfel What was the solution for you? I'm having this same error, but no matter how much I open up the permissions, I still get the error.

@jonahbron commented on GitHub: @LukasWerfel What was the solution for you? I'm having this same error, but no matter how much I open up the permissions, I still get the error.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2203