Podman socket access denied for backup container
@lawndoc is already working on this.
Since Dec 2, 2025.
- Dominant language
- Python
- Stars
- 180
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I wanted to try this image with podman-compose but the rcb backup command fails with permission denied. I already tried to change the permissions of the socket to rw for all users that didn't help.
It worked by adding privileged=True to the backup container here: https://github.com/lawndoc/stack-back/blob/e11842b44b6d9b146b1234fc90fce83a146a2d44/src/restic_compose_backup/backup_runner.py#L20-L30
Am I doing something wrong in my configuration?
I am running Podman using podman machine on macos.
compose.yml
services:
stack-back:
image: ghcr.io/lawndoc/stack-back:v1.5.3
restart: unless-stopped
privileged: true
environment:
RESTIC_REPOSITORY: /srv/restic-repo
RESTIC_PASSWORD: test
DOCKER_HOST: unix://var/run/docker.sock
volumes:
- /run/user/501/podman/podman.sock:/var/run/docker.sock
- ./backup:/srv/restic-repo
Error message from backup container:
Traceback (most recent call last):
File "/restic-compose-backup/.venv/bin/rcb", line 10, in <module>
sys.exit(main())
~~~~^^
File "/restic-compose-backup/restic_compose_backup/cli.py", line 23, in main
containers = RunningContainers()
File "/restic-compose-backup/restic_compose_backup/containers.py", line 400, in __init__
all_containers = utils.list_containers()
File "/restic-compose-backup/restic_compose_backup/utils.py", line 39, in list_containers
client = docker_client()
File "/restic-compose-backup/restic_compose_backup/utils.py", line 29, in docker_client
return docker.from_env()
~~~~~~~~~~~~~~~^^
File "/restic-compose-backup/.venv/lib/python3.14/site-packages/docker/client.py", line 94, in from_env
return cls(
timeout=timeout,
...<3 lines>...
**kwargs_from_env(**kwargs)
)
File "/restic-compose-backup/.venv/lib/python3.14/site-packages/docker/client.py", line 45, in __init__
self.api = APIClient(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/restic-compose-backup/.venv/lib/python3.14/site-packages/docker/api/client.py", line 207, in __init__
self._version = self._retrieve_server_version()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/restic-compose-backup/.venv/lib/python3.14/site-packages/docker/api/client.py", line 230, in _retrieve_server_version
raise DockerException(
f'Error while fetching server API version: {e}'
) from e
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.