-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
uploads_path not being used for in-progress uploads #6567
Description
Description
Despite what homeserver.yaml
implies, Synapse is not storing in-progress uploads in uploads_path
.
For reference, the comment in the sample homeserver.yaml
reads: # Directory where in-progress uploads are stored.
I am running Synapse in a read-only root filesystem with writes allowed in /data/uploads
. I have set uploads_path: "/data/uploads"
in my homeserver.yaml
. When attempting to upload an image to Synapse, the upload fails and Synapse logs:
2019-12-18 21:27:07,667 - synapse.http.site - 203 - WARNING - - Error processing request <XForwardedForRequest at 0x7f99e3fb8c90 method='(no method yet)' uri='(no uri yet)' clientproto='(no clientproto yet)' site=8008>: <class 'FileNotFoundError'> [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
(note that /data/uploads
is not listed as a candidate for temporary uploads in the list at the end of the log)
Steps to reproduce
- Configure Synapse in a docker container or other host, run as a user without write permissions on
/
- Allow write access to
/data/uploads
- Configure
homeserver.yaml
with:uploads_path: "/data/uploads"
- Start Synapse, join a room, and upload any image via Riot (or any other client)
The image will fail to upload and a message similar to this will be logged:
2019-12-18 21:27:07,667 - synapse.http.site - 203 - WARNING - - Error processing request <XForwardedForRequest at 0x7f99e3fb8c90 method='(no method yet)' uri='(no uri yet)' clientproto='(no clientproto yet)' site=8008>: <class 'FileNotFoundError'> [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
/data/uploads
is not listed as a candidate temporary directory in the error message
Version information
- Homeserver:
In a Docker image of Synapse, not a public homeserver
-
Version: 1.7.0
-
Install method:
matrixdotorg/synapse
Docker image
- Platform: Linux (Docker)