My instance of vikunjia using docker-compose throws an error (error 500) whenever I upload any attachment (avatar, background, etc). Based on the posts I have seen, this seems to be a permission issue of the
files folder in the docker container. What should the compose configuration be to avoid these type of errors?
So far I have:
api: image: vikunja/api environment: VIKUNJA_SERVICE_ENABLETASKATTACHMENTS: 1
logging into docker container, I see that the files is owned by root.
$ sudo docker exec -it vikunja-api-1 sh $ ls -alh -rwxr-xr-x 1 vikunja root 39.2M Jan 24 17:05 vikunja drwxr-xr-x 1 vikunja root 4.0K Jan 24 17:06 . drwxr-xr-x 2 root root 4.0K Mar 1 20:43 files
Is there a way to avoid this when setting up vikunjia, other than using chown after the fact? i.e. do I need to add PUID, PGID as follows?
environment: VIKUNJA_SERVICE_ENABLETASKATTACHMENTS: 1 PUID=1000 PGID=1000
and to fix this issue, do I change ownership of the
files folder to
chown -R vikunja:root files? or
chown -R vikunja:vikunja files?