GithubHelp home page GithubHelp logo

Comments (3)

ior308 avatar ior308 commented on July 19, 2024

Here the output vsftpd side:
Tue Nov 8 08:27:04 2022 [pid 351212] CONNECT: Client "::ffff:192.168.1.122"
Tue Nov 8 08:27:04 2022 [pid 351212] FTP response: Client "::ffff:192.168.1.122", "220 (vsFTPd 3.0.3)"
Tue Nov 8 08:27:04 2022 [pid 351212] FTP command: Client "::ffff:192.168.1.122", "AUTH TLS"
Tue Nov 8 08:27:04 2022 [pid 351212] FTP response: Client "::ffff:192.168.1.122", "234 Proceed with negotiation."
Tue Nov 8 08:27:04 2022 [pid 351212] FTP command: Client "::ffff:192.168.1.122", "USER root"
Tue Nov 8 08:27:04 2022 [pid 351212] [root] FTP response: Client "::ffff:192.168.1.122", "331 Please specify the password."
Tue Nov 8 08:27:04 2022 [pid 351212] [root] FTP command: Client "::ffff:192.168.1.122", "PASS "
Tue Nov 8 08:27:04 2022 [pid 351211] [root] OK LOGIN: Client "::ffff:192.168.1.122"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "230 Login successful."
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP command: Client "::ffff:192.168.1.122", "PBSZ 0"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "200 PBSZ set to 0."
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP command: Client "::ffff:192.168.1.122", "PROT P"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "200 PROT now Private."
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP command: Client "::ffff:192.168.1.122", "FEAT"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "211-Features:"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " AUTH TLS\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " EPRT\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " EPSV\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " MDTM\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " PASV\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " PBSZ\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " PROT\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " REST STREAM\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " SIZE\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " TVFS\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", " UTF8\x0D\x0A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "211 End"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP command: Client "::ffff:192.168.1.122", "TYPE A"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "200 Switching to ASCII mode."
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP command: Client "::ffff:192.168.1.122", "PASV"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "227 Entering Passive Mode (192,168,1,122,190,143)."
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP command: Client "::ffff:192.168.1.122", "STOR msg-dst.txt"
Tue Nov 8 08:27:04 2022 [pid 351216] [root] FTP response: Client "::ffff:192.168.1.122", "150 Ok to send data."

from goftp.

ior308 avatar ior308 commented on July 19, 2024

And here some debug I added while storing client side, when does not work and when works (without TLS):

7 220 (vsFTPd 3.0.3)
7 234 Proceed with negotiation.
7 331 Please specify the password.
7 230 Login successful.
7 200 PBSZ set to 0.
7 200 PROT now Private.
7 211 Features:
AUTH TLS
EPRT
EPSV
MDTM
PASV
PBSZ
PROT
REST STREAM
SIZE
TVFS
UTF8
End
7 200 Switching to ASCII mode.
7 227 Entering Passive Mode (192,168,1,122,190,143).
7 150 Ok to send data.
io.Copy: 0
7 0 error reading response: unexpected EOF
6 0 0 error reading response: unexpected EOF
4: error reading response: unexpected EOF
panic: error reading response: unexpected EOF


7 220 (vsFTPd 3.0.3)
7 331 Please specify the password.
7 230 Login successful.
7 211 Features:
EPRT
EPSV
MDTM
PASV
REST STREAM
SIZE
TVFS
UTF8
End
7 200 Switching to ASCII mode.
7 227 Entering Passive Mode (192,168,1,122,186,107).
7 150 Ok to send data.
io.Copy: 0
7 226 Transfer complete.
8

from goftp.

ior308 avatar ior308 commented on July 19, 2024

With TLS, it seems that io.copy of zero bytes is ignored. Adding a fake write of zero it works ?!

transfer.go
...

func (c *Client) transferFromOffset
...
n, err := io.Copy(dest, src)
dest.Write([]byte{})

..

from goftp.

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.