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.65k stars 48 forks source link

[BUG] - SCP connection doesn't show files with certain permissions in list #246

Closed jacobfrantz1 closed 2 months ago

jacobfrantz1 commented 5 months ago

Description

Using an older device that only supports SCP

I have some files with the linux permission string: rw-rwSrw- The uppercase S appears to make it an invalid file entry It appears to handle the lowercase s permission

In the log I see "Parsing LS line: '-rw-rwSrw- 1 manufact manufact 3792 Apr 22 09:57 L9800.SPF'" but it is not accompanied by the found entry line

Steps to reproduce

Have a file with the permission string rw-rwSrw- on linux server See that it doesn't appear when using termscp with a SCP connection

Expected behaviour

Files should be shown when using SCP and an uppercase S permission value I haven't check it but other weird linux permission letters might also not be handled like (S,t,T)

Environment

Log

2024-04-22T16:32:05.350400529Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: 'dr-xrwsr-x    3 operator1 operator      4096 Apr 22 11:43 .'
2024-04-22T16:32:05.350635407Z [DEBUG] (1) remotefs_ssh::ssh::scp: File name is .; ignoring entry
2024-04-22T16:32:05.3507813Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: 'dr-xrwsr-x    7 operator1 operator      4096 Jan  1  1994 ..'
2024-04-22T16:32:05.350959532Z [DEBUG] (1) remotefs_ssh::ssh::scp: File name is ..; ignoring entry
2024-04-22T16:32:05.351098912Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: '-rw-rwSrw-    1 user      user        377467 Dec 31  1993 test.xml'
2024-04-22T16:32:05.351325365Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: 'drwxrwsr-x    2 user      user          4096 Apr 22 11:37 testdir'
2024-04-22T16:32:05.351503888Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:199] Found entry at /prog/testdir with metadata Metadata { accessed: None, created: None, gid: None, mode: Some(UnixPex(UnixPexClass { read: true, write: true, execute: true }, UnixPexClass { read: true, write: true, execute: true }, UnixPexClass { read: true, write: false, execute: true })), modified: Some(SystemTime { tv_sec: 1713785820, tv_nsec: 0 }), size: 4096, symlink: None, file_type: Directory, uid: None }
2024-04-22T16:32:05.352183495Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: '-rw-rwSrw-    1 manufact  manufact      3792 Apr 22 09:57 L200.SPF'
2024-04-22T16:32:05.352351248Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: '-rw-r--r--    1 manufact  operator      2168 Apr 19 16:54 L210.SPF'
2024-04-22T16:32:05.352524592Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:199] Found entry at /prog/L210.SPF with metadata Metadata { accessed: None, created: None, gid: None, mode: Some(UnixPex(UnixPexClass { read: true, write: true, execute: false }, UnixPexClass { read: true, write: false, execute: false }, UnixPexClass { read: true, write: false, execute: false })), modified: Some(SystemTime { tv_sec: 1713545640, tv_nsec: 0 }), size: 2168, symlink: None, file_type: File, uid: None }
2024-04-22T16:32:05.353228575Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: '-rw-rw-r--    1 manufact  operator    368601 Apr 19 16:54 Test2.mpf'
2024-04-22T16:32:05.353408982Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:199] Found entry at /prog/Test2.mpf with metadata Metadata { accessed: None, created: None, gid: None, mode: Some(UnixPex(UnixPexClass { read: true, write: true, execute: false }, UnixPexClass { read: true, write: true, execute: false }, UnixPexClass { read: true, write: false, execute: false })), modified: Some(SystemTime { tv_sec: 1713545640, tv_nsec: 0 }), size: 368601, symlink: None, file_type: File, uid: None }
2024-04-22T16:32:05.354060658Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: '-rw-rwSrw-    1 manufact  manufact    241813 Apr 22 09:31 L9800.SPF'
2024-04-22T16:32:05.354225065Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:87] Parsing LS line: '-rw-rw-r--    1 manufact  operator    313678 Apr 19 17:13 TEST.NC'
2024-04-22T16:32:05.354401464Z [TRACE] (1) remotefs_ssh::ssh::scp: [/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remotefs-ssh-0.2.1/src/ssh/scp.rs:199] Found entry at /prog/TEST.NC with metadata Metadata { accessed: None, created: None, gid: None, mode: Some(UnixPex(UnixPexClass { read: true, write: true, execute: false }, UnixPexClass { read: true, write: true, execute: false }, UnixPexClass { read: true, write: false, execute: false })), modified: Some(SystemTime { tv_sec: 1713546780, tv_nsec: 0 }), size: 313678, symlink: None, file_type: File, uid: None }
2024-04-22T16:32:05.355065292Z [DEBUG] (1) remotefs_ssh::ssh::scp: Found 4 out of 9 valid file entries
2024-04-22T16:32:11.223564377Z [DEBUG] (1) remotefs_ssh::ssh::scp: Disconnecting from remote...
2024-04-22T16:32:11.225923619Z [INFO] FileTransferActivity terminated due to 'Quit'
2024-04-22T16:32:11.239987518Z [INFO] termscp terminated with exitcode 0

Additional information

veeso commented 2 months ago

Fixed in remotefs-ssh 0.3.1 9036d83