transfer.sh
transfer.sh copied to clipboard
No default `/tmp` volume/directory in docker container
By default, /tmp is used for tmpfiles. This directory is not created by default and might break some existing deployments, since this requirement seems new.
Origin: https://github.com/dutchcoders/transfer.sh/pull/389#issuecomment-1008686228
In addition to this issue, changing the directory as a workaround doesn't do the trick anymore :
# docker run -d --restart always --publish 8080:8080 -v "/home/transfer:/transfer" dutchcoders/transfer.sh:latest --provider local --basedir=/transfer
[transfer.sh]2022/02/03 18:00:19 Transfer.sh server started.
using temp folder: /tmp/
--temp-path is the param for the temp folder
The easiest fix for docker containers likely is to create the directory in the Dockerfile. The other approach is to set the mentioned path to the current working dir. What would you prefer?
--temp-path doesn't seem to change this anyway, seems like the folder should just exist regardless?
2022-04-18 22:46:32.404635+00:00using temp folder: /temporary/
2022-04-18 22:46:32.404639+00:00using storage provider: local
2022-04-18 22:46:32.404642+00:00[transfer.sh]2022/04/18 22:46:32 listening on port: :8080
2022-04-18 22:46:32.404651+00:00[transfer.sh]2022/04/18 22:46:32 ---------------------------
2022-04-18 22:47:58.667058+00:00[transfer.sh]2022/04/18 22:47:58 open /tmp/multipart-1790426455: no such file or directory
the flag is --temp-path not --tmp-path
typo
@gwigz what version are you using?
there's no explicit saving of a multipart preìfix temporary file in the code, I vaguely remember there was once, but I'm not sure
if I set --temp-path to /dir/not/exists this the output:
[transfer.sh]2022/04/20 22:50:29 Transfer.sh server started.
using temp folder: /dir/not/exists/
using storage provider: local
[transfer.sh]2022/04/20 22:50:29 listening on port: :8080
[transfer.sh]2022/04/20 22:50:29 ---------------------------
[transfer.sh]2022/04/20 22:50:38 open /dir/not/exists/transfer-292564794: no such file or directory
but that's rather expected and there is a match between tempo folder and the message on temp file creation