GithubHelp home page GithubHelp logo

Comments (7)

DrackThor avatar DrackThor commented on June 6, 2024

Same problem here - I tried the simple example from the README.md docs:
image ID: 92f2b0b2f3ff

# started the container
docker run --publish 8080:8080 dutchcoders/transfer.sh:latest-noroot --provider local --basedir /tmp/

# tried to upload a random file
curl -v \
--upload-file ./README.md \
https://localhost:8080/README.md

CURL:

curl -v \
--upload-file ./README.md \
http://localhost:8080/README.md
*   Trying [::1]:8080...
* connect to ::1 port 8080 failed: Connection refused
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080
> PUT /README.md HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/8.4.0
> Accept: */*
> Content-Length: 6173
>
* We are completely uploaded and fine
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
< Server: Transfer.sh HTTP Server
< X-Content-Type-Options: nosniff
< X-Made-With: <3 by DutchCoders
< X-Served-By: Proudly served by DutchCoders
< Date: Fri, 16 Feb 2024 09:29:59 GMT
< Content-Length: 24
<
Could not save metadata
* Connection #0 to host localhost left intact

Container LOG:

[transfer.sh]2024/02/16 09:29:43 Transfer.sh server started.
using temp folder: /tmp/
using storage provider: local
[transfer.sh]2024/02/16 09:29:43 starting to listen on: :8080
[transfer.sh]2024/02/16 09:29:43 ---------------------------
[transfer.sh]2024/02/16 09:29:59 mkdir /tmp/uYP5HPT8wo: permission denied
[transfer.sh]2024/02/16 09:29:59 172.17.0.1:54290 - - [2024-02-16T09:29:59Z] "PUT /README.md HTTP/1.1" 500  "" "curl/8.4.0"
^C[transfer.sh]2024/02/16 09:30:32 Server stopped.

from transfer.sh.

DrackThor avatar DrackThor commented on June 6, 2024

I also tried the same thing with the :latest (root) image - this works fine.
So this very much looks like a -noroot image issue

from transfer.sh.

aspacca avatar aspacca commented on June 6, 2024

thanks for the report, I'll check on it

from transfer.sh.

scolandrea avatar scolandrea commented on June 6, 2024

I fixed the issues by mapping the volume from host to container.

Example: docker run --publish 8080:8080 --volume "./tmp:/data" dutchcoders/transfer.sh:latest-noroot --provider local --basedir "/data"

from transfer.sh.

zurborg avatar zurborg commented on June 6, 2024

I've tried adding /tmp as volume, and now I get this error:

HTTP/2 400 
content-type: text/plain; charset=utf-8
server: Transfer.sh HTTP Server
x-content-type-options: nosniff
x-made-with: <3 by DutchCoders
x-served-by: Proudly served by DutchCoders
date: Sun, 07 Apr 2024 07:11:19 GMT
content-length: 28

Could not upload empty file

Logfile says:

Empty content-length

from transfer.sh.

scolandrea avatar scolandrea commented on June 6, 2024

I've tried adding /tmp as volume, and now I get this error:

HTTP/2 400 
content-type: text/plain; charset=utf-8
server: Transfer.sh HTTP Server
x-content-type-options: nosniff
x-made-with: <3 by DutchCoders
x-served-by: Proudly served by DutchCoders
date: Sun, 07 Apr 2024 07:11:19 GMT
content-length: 28

Could not upload empty file

Logfile says:

Empty content-length

If you run as I posted, first, you must create a directory "tmp" in your current directory. My reply is just trying to explain that you need to make sure the directory exists in the container and you have mapped it on the host.

Good luck

from transfer.sh.

zurborg avatar zurborg commented on June 6, 2024

I created the directory before and set the uid and gid both to 5000. Permission is 0775. I can upload any non-empty file. Except for empty files I got the mentioned error.

I think this is fine. Sharing empty files is a bit of useless, so this error don't need to be fixed. Besides, with this setup the error code changed from 500 to 400.

from transfer.sh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.