No default /tmp volume/directory in docker container #126

Closed
opened 2026-01-19 18:29:04 +00:00 by michael · 7 comments
Owner

Originally created by @LinusCDE on GitHub.

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

Originally created by @LinusCDE on GitHub. 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
michael added the enhancementquestion labels 2026-01-19 18:29:04 +00:00
Author
Owner

@stefanbenten commented on GitHub:

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?

@stefanbenten commented on GitHub: 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?
Author
Owner

@Enohriel commented on GitHub:

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/
@Enohriel commented on GitHub: 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/ ```
Author
Owner

@paolafrancesca commented on GitHub:

--temp-path is the param for the temp folder

@paolafrancesca commented on GitHub: `--temp-path` is the param for the temp folder
Author
Owner

@paolafrancesca commented on GitHub:

the flag is --temp-path not --tmp-path

@paolafrancesca commented on GitHub: the flag is `--temp-path` not `--tmp-path`
Author
Owner

@gwigz commented on GitHub:

--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
@gwigz commented on GitHub: `--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 ```
Author
Owner

@gwigz commented on GitHub:

typo

@gwigz commented on GitHub: typo
Author
Owner

@paolafrancesca commented on GitHub:

@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

@paolafrancesca commented on GitHub: @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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#126