Uploads fail on new deployments
We store uploads in a docker volume. When this volume is first created (e.g. when setting up a new deployment or a new dev environment) the owner of the volume is not set correctly: the owner should be node
but it comes out as root
. This prevents uploading any files, including new manuscripts.
The workaround is to manually go into the server container as root, and change the owner of the uploads folder to node
. This only needs to be done once; the volume will retain the correct permissions forever after. Do the following (your server name may differ; run docker ps
to list servers):
docker exec -u 0 -it kotahi_server_1 /bin/bash
chown -R node:node uploads
I have opened a StackOverflow question regarding this.
Related to #685 (closed).