Comments (3)
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.
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.
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)
- No error when unable to connect HOT 3
- Folder containing closing bracket ] don't MLSD / LIST content HOT 1
- Go module version tags?
- CWD is not work HOT 2
- error in ReadDir: failed parsing LIST entry: in Microsoft FTP Service
- Error storing files
- Failed parsing MLSD response on some servers HOT 2
- 出错的时候,数据连接没有关闭 HOT 1
- Retrieve a file from offset? HOT 2
- Failing data connection with STARTTLS (Explicit TLS): tls session not reused HOT 13
- proxy support HOT 7
- Microsoft FTP Service
- Future of goftp HOT 5
- unexpected response: 550-SSL/TLS required on the control channel (go lang)(Please help me out ) HOT 4
- How to support SOCKS ?
- ReadDir report linked file name instead of link name
- Trasfer mode MODE C (S=stream, B=block, C=compressed).
- ReadDir timeout because of weird port usage HOT 1
- ReadDir() cannot read windows hosted ftp directories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goftp.