veeso / termscp

🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB
https://termscp.veeso.dev
MIT License
1.78k stars 49 forks source link

[BUG] - Can not enter the directory #303

Open archwizmgm opened 1 month ago

archwizmgm commented 1 month ago

Description

Can not enter the directory. image

The other directories are working fine; only ‘/00CM’ is getting this error.

Environment

Log

2024-10-15T08:08:20.3496249Z [INFO] Connection established!
2024-10-15T08:08:20.3496947Z [INFO] Established connection with '': "220 (vsFTPd 3.0.2)"
2024-10-15T08:08:20.5755775Z [DEBUG] (1) remotefs_ftp::client: Getting working directory...
2024-10-15T08:08:20.6159992Z [DEBUG] (1) remotefs_ftp::client: Getting list entries for /
2024-10-15T08:08:35.45623Z [DEBUG] (1) remotefs_ftp::client: Changing working directory to /00CM
2024-10-15T08:08:35.5006547Z [INFO] Changed directory on remote: /00CM
2024-10-15T08:08:35.5007788Z [DEBUG] (1) remotefs_ftp::client: Getting working directory...
2024-10-15T08:08:35.5405966Z [DEBUG] (1) remotefs_ftp::client: Getting list entries for /00CM
2024-10-15T08:08:35.7015793Z [ERROR] Failed to list directory: Response contains an invalid syntax
2024-10-15T08:08:35.701888Z [ERROR] Could not scan current remote directory: protocol error (Response contains an invalid syntax)
2024-10-15T08:08:35.7020965Z [DEBUG] (1) remotefs_ftp::client: Getting working directory...
2024-10-15T08:08:35.772975Z [DEBUG] (1) remotefs_ftp::client: Getting list entries for /00CM
2024-10-15T08:08:35.9503306Z [ERROR] Failed to list directory: Response contains an invalid syntax
2024-10-15T08:08:35.950644Z [ERROR] Could not scan current remote directory: protocol error (Response contains an invalid syntax)
veeso commented 1 month ago

Hi,

unfortunately this issue is not strictly related to termscp, but to suppaftp, which is also implemented by me. Unfortunately suppaftp logs are filtered, so the actionnable for this issue is not to filter them.

But I'd like to understand what the issue is, so if you want, you can install suppaftp-cli and try to connect to the server and check with the debug option what is causing the issue by providing me with the log.

suppaftp-cli --debug <socket_addr>
LOGIN
... enter password
CWD /00CM
LIST
archwizmgm commented 1 month ago

@veeso Here is the log.

[2024-10-21T08:30:13Z DEBUG suppaftp::sync_ftp] Signin in with user ''
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] CC OUT: USER 
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] CC IN: [51, 51, 49, 32, 80, 108, 101, 97, 115, 101, 32, 115, 112, 101, 99, 105, 102, 121, 32, 116, 104, 101, 32, 112, 97, 115, 115, 119, 111, 114, 100, 46, 13, 10]
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] Code parsed from response: user name okay, need password (331)
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] CC IN: [51, 51, 49, 32, 80, 108, 101, 97, 115, 101, 32, 115, 112, 101, 99, 105, 102, 121, 32, 116, 104, 101, 32, 112, 97, 115, 115, 119, 111, 114, 100, 46, 13, 10]
[2024-10-21T08:30:13Z DEBUG suppaftp::sync_ftp] Password is required
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] CC OUT: PASS 
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] CC IN: [50, 51, 48, 32, 76, 111, 103, 105, 110, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 46, 13, 10]
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] Code parsed from response: user logged in, proceed. Logged out if appropriate. (230)
[2024-10-21T08:30:13Z TRACE suppaftp::sync_ftp] CC IN: [50, 51, 48, 32, 76, 111, 103, 105, 110, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 46, 13, 10]
[2024-10-21T08:30:13Z DEBUG suppaftp::sync_ftp] Login OK
OK
>> cwd /00CM
[2024-10-21T08:30:38Z DEBUG suppaftp::sync_ftp] Changing working directory to /00CM
[2024-10-21T08:30:38Z TRACE suppaftp::sync_ftp] CC OUT: CWD /00CM
[2024-10-21T08:30:38Z TRACE suppaftp::sync_ftp] CC IN: [50, 53, 48, 32, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 99, 104, 97, 110, 103, 101, 100, 46, 13, 10]
[2024-10-21T08:30:38Z TRACE suppaftp::sync_ftp] Code parsed from response: requested file action okay (250)
[2024-10-21T08:30:38Z TRACE suppaftp::sync_ftp] CC IN: [50, 53, 48, 32, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 99, 104, 97, 110, 103, 101, 100, 46, 13, 10]
OK
>> list
[2024-10-21T08:30:41Z DEBUG suppaftp::sync_ftp] Reading working directory content
[2024-10-21T08:30:41Z DEBUG suppaftp::sync_ftp] PASV command
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC OUT: PASV
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC IN: [50, 50, 55, 32, 69, 110, 116, 101, 114, 105, 110, 103, 32, 80, 97, 115, 115, 105, 118, 101, 32, 77, 111, 100, 101, 32, 40, 53, 56, 44, 50, 52, 55, 44, 57, 50, 44, 49, 50, 50, 44, 49, 52, 54, 44, 50, 51, 57, 41, 46, 13, 10]
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] Code parsed from response: entering passive mode (227)
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC IN: [50, 50, 55, 32, 69, 110, 116, 101, 114, 105, 110, 103, 32, 80, 97, 115, 115, 105, 118, 101, 32, 77, 111, 100, 101, 32, 40, 53, 56, 44, 50, 52, 55, 44, 57, 50, 44, 49, 50, 50, 44, 49, 52, 54, 44, 50, 51, 57, 41, 46, 13, 10]
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] Passive address: 
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC OUT: LIST
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC IN: [49, 53, 48, 32, 72, 101, 114, 101, 32, 99, 111, 109, 101, 115, 32, 116, 104, 101, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 108, 105, 115, 116, 105, 110, 103, 46, 13, 10]
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] Code parsed from response: file status okay, about to open data connection (150)
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC IN: [49, 53, 48, 32, 72, 101, 114, 101, 32, 99, 111, 109, 101, 115, 32, 116, 104, 101, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 108, 105, 115, 116, 105, 110, 103, 46, 13, 10]
[2024-10-21T08:30:41Z DEBUG suppaftp::sync_ftp] Finalizing retr stream
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] dropped stream
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC IN: [50, 50, 54, 32, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 115, 101, 110, 100, 32, 79, 75, 46, 13, 10]
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] Code parsed from response: closing data connection (226)
[2024-10-21T08:30:41Z TRACE suppaftp::sync_ftp] CC IN: [50, 50, 54, 32, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 115, 101, 110, 100, 32, 79, 75, 46, 13, 10]
LIST error: Response contains an invalid syntax
veeso commented 1 month ago

Amazing, I will check it and come back with the solution (I hope)