Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

uploads_path not being used for in-progress uploads #6567

@typokign

Description

@typokign

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions