fphammerle/docker-radicale

Permission problem

AuspeXeu opened this issue · 2 comments

When running your image with the following compose entry

radicale:
  image: fphammerle/radicale
  hostname: radicale
  container_name: radicale
  ports:
    - 5232:5232
  volumes:
    - ./radicale/config:/etc/radicale/config:ro
    - ./radicale/users:/etc/radicale/htpasswd:ro
    - ./radicale-data:/var/lib/radicale/collections:rw
  restart: "unless-stopped"

I get the following permissions problem

[2023-04-24 14:21:07 +0000] [1/Thread-3] [ERROR] An exception occurred during PROPFIND request on '/': [Errno 13] Permission denied: '/var/lib/radicale/collections/.Radicale.lock'

Hi,

you need to either loosen the permissions of ./radicale-data (e.g., via chmod a+rwxt ./radicale-data; not recommended)
or run the container as the user who owns the ./radicale-data folder:

  1. retrieve uid owning folder: stat -c%u radicale-data
  2. add user: 1000 to docker-compose.yml (replace 1000 with result of stat)

(assuming that you did not enable user namespace remapping)

Thanks, that resolved the issue.