Closed mcanyucel closed 4 months ago
I changed the owners of the config & user files on the host to 2999 but it did not work
styx@valinor:sudo addgroup --gid 2999 radicale
styx@valinor:sudo adduser --gid 2999 --uid 2999 --shell /bin/false --disabled-password --no-create-home radicale
styx@valinor:sudo chown -R radicale:radicale config
styx@valinor:~/containers/radicale$ ls -la config/
total 16
drwxr-xr-x 2 radicale radicale 4096 May 22 16:56 .
drwxr-xr-x 4 styx styx 4096 May 22 16:54 ..
-rw-r--r-- 1 radicale radicale 2451 May 22 16:56 config
-rw-r--r-- 1 radicale radicale 48 May 22 16:23 users
Hi @mcanyucel ,
Can you try with absolute path for volumes
?
volumes:
- /data/radicale/data:/data
- /data/radicale/config:/config:ro
Hi!
I changed the volume paths to absolute but nothing changed:
volumes:
- /home/styx/containers/radicale/data:/data
- /home/styx/containers/radicale/config/config:/etc/radicale/config:ro
- /home/styx/containers/radicale/config/users:/etc/radicale/users:ro
When I check the contents of the file within the container, the content is correct. Is there a command to restart radicale within the container? maybe if I restart the radicale service within the container it will use the config?
Maybe the radicale service cannot access the files within the container. but I do not get any file not found or permission denied errors. Well I do not see any errors so I am assuming there are none; is there a log for radicale?
Got it : the config radicale use is /config/config
(config
file in the /config
folder).
So this is not /etc/radicale/config
.
Can you confirm and close accordingly?
FYI, the CMD
in the Dockerfile is:
CMD ["/venv/bin/radicale", "--config", "/config/config"]
That was a correct point, the container now works using the config file:
/containers/radicale$ sudo docker compose up
[+] Running 1/0
✔ Container radicale Created 0.0s
Attaching to radicale
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] Loaded default config
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] Loaded config file '/config/config'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] Starting Radicale
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] auth type is 'radicale.auth.htpasswd'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] auth htpasswd encryption is 'radicale.auth.htpasswd_encryption.md5'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] storage type is 'radicale.storage.multifilesystem'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] rights type is 'radicale.rights.owner_only'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] web type is 'radicale.web.internal'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] permit delete of collection: True
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] Listening on '0.0.0.0:5232'
radicale | [2024-05-23 14:10:50 +0000] [7] [INFO] Radicale server ready
Thanks !
Even though I map the config file as a volume, radicale does not use this config file; it uses defaults. I know this because even if I change the port to 7777, it runs at 5232 and it does not use the userfile (not prints any logs).
I have the following compose file:
I have the config file under config/config (it is mapped to the /etc/radicale/config as readonly)
I check the presence of the file within the container using
docker exec -it radicale /bin/sh
and it is there:But it does not use these files. Should I make them owned by user 2999? Or any other ideas?
PS: In the host computer, every user has read permission for the files: