New SFTP plugin available now

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

The strange thing is that I cannot reproduce it at all. I have modified the plugin to send LANG=C first, and I get this in the log:

Code: Select all

export LC_ALL=C
LANG=C ls -la /path_redacted/subdir/
drwxr-xr-x.  2 ghisler2 psacln 4096 Feb 28 09:55 !subdir
drwxr-xr-x. 10 ghisler2 psacln 4096 Feb 28 10:00 ..
-rw-r--r--.  1 ghisler2 psacln  101 Feb 11 10:41 asdf
But both folder !subdir and file asdf appear in the list. Both scp for transfers and scp for everything are checked.
I also can't find anything in my code which would explain the skipped line.

Can someone give me access to a server which is causing this problem, or provide instructions to install a Virtualbox server with this problem?
Author of Total Commander
https://www.ghisler.com
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Re: New SFTP plugin available now

Post by *Unused »

Hi together. After login via SFTP, i see always in the root folder after login a entry with the name

Code: Select all

~
Image: https://share-your-photo.com/3ec841a739.

This entry is not there, when i use ls -la on the same directory:

Code: Select all

drwxr-xr-x 12 root     root      4096 Sep  5 14:24 .
drwxr-xr-x  4 root     root      4096 Oct 14 12:27 ..
drwxr-xr-x 18 www-data www-data  4096 Oct 31  2019 copsthmb
drwxr-xr-x  4 www-data www-data  4096 Nov 12  2020 enigma
drwx------  2 root     root     16384 Sep  2  2022 lost+found
Whats that for entry?
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Unused wrote: 2024-02-28, 11:19 UTC i see always in the root folder after login a entry with the name

Code: Select all

~
Whats that for entry?
It is only the short for the home directory, not a real folder. Simply called "tilde" (like the char). So, don't care...

See https://en.wikipedia.org/wiki/Home_directory
Last edited by JOUBE on 2024-02-28, 11:56 UTC, edited 1 time in total.
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

ghisler(Author) wrote: 2024-02-28, 09:05 UTC But both folder !subdir and file asdf appear in the list. Both scp for transfers and scp for everything are checked.
But do you have "touched" the file with name "!file". If yes, file is missing in your log (and that is the problem, we discuss here). If no, "touch !file" (without quotes) at tc commandline and try again.

Joube
User avatar
Unused
Member
Member
Posts: 122
Joined: 2005-01-19, 20:26 UTC

Re: New SFTP plugin available now

Post by *Unused »

JOUBE wrote: 2024-02-28, 11:48 UTC It is only the short for the home directory, not a real folder. Simply called "tilde" (like the char). So, don't care...
Is there some way to disable this behavior? Its not a big deal, but not what i expected...
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Unused wrote: 2024-02-28, 13:31 UTC
JOUBE wrote: 2024-02-28, 11:48 UTC It is only the short for the home directory, not a real folder. Simply called "tilde" (like the char). So, don't care...
Is there some way to disable this behavior? Its not a big deal, but not what i expected...
No.

For POSIX users (Unix/Linux/Unix-like) it is even important.

To say it with "Ten years after" at Woodstock festival: I'm going home...

I'm going ~

;-)

%HOMEPATH% is near to this

Edit: You can use "pwd" or "readlink -f ." (without quotes) to get the path.
Last edited by JOUBE on 2024-02-29, 10:57 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

But do you have "touched" the file with name "!file".
I have now added a new file named !file too. They both appear before ".." in the list, but both are also displayed in the Total Commander file list.

I will try to install OpenWrt according to the above given instructions, and hope that I can then reproduce it:
https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

I was able to reproduce the problem with OpenWRT! The reason for the problem was that OpenWRT's ls command does not send the line
total x
at the start of the reply. My plugin was relying on that, so it dropped the first character of the reply to check whether the server sent a valid reply or an error. Therefore in the OpenWRT response the first character of the permissions was lost, and the line wasn't recognized as valid, and was skipped.

Download:
https://www.totalcommander.ch/beta/sftpplug310b5.zip
Source code:
https://www.totalcommander.ch/beta/sftpplug_src310b5.zip
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Additional interesting things:

- There is no such a problem with dropbear implementation on dietpi. It seems to be specific with dropbear on openwrt...

- The problem is independent of settings: LANG=...
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

ghisler(Author) wrote: 2024-02-29, 10:34 UTC I was able to reproduce the problem with OpenWRT! The reason for the problem was that OpenWRT's ls command does not send the
the line
total x
at the start of the reply.
I confirm that the problem is solved. Works well now with OpenWRT's dropbear implementation.
Thanks.

Joube
Last edited by JOUBE on 2024-02-29, 13:17 UTC, edited 1 time in total.
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

JOUBE wrote: 2024-02-05, 09:33 UTCCompletely unimportant in the beta at the moment, but essential for a release: the remaining time is completely wrong (for example it shows 2 minutes when it still takes 15 minutes).
ghisler(Author) wrote: 2024-02-05, 10:12 UTC The remaining time is calculated by Total Commander, not by the plugin. It's based on the speed during the last few seconds (averaged), so it can take a moment to get accurate values, or not get good values when the speed varies too much.
ghisler(Author) wrote: 2024-02-06, 10:12 UTC I have checked it in the debugger now: The problem is that the plugin now sends progress callback messages to Total Commander even when the amount of uploaded data hasn't changed. That's because the block size is so big that the ssh library returns ERROR_EAGAIN multiple times until the block has finally been sent. This results in incorrect speed readings. I will add a fix to Total Commander 11.03 RC5. I can't fix it in the plugin because the callbacks are also important to not freeze the program during the transfer.
I've tested it now and the remaining time works much better now. Thanks.

Although it is not documented in history.txt, there must have been internal changes in the main Tc program so that the remaining time now matches the actual time used fairly well.

From my point of view, nothing stands in the way of releasing the plugin in the new version.

Edit: Once again adding the note: the new dynamic routines should only be used during file transfers and not during operations such as reading of directories, quoting, etc.

Joube

PS.: Interestingly, despite the significantly increased transmission performance, the absolute amount of data has hardly increased, if I understand correctly. Previously, a lot of data were spent managing the transfer.
juliusjoestar
Junior Member
Junior Member
Posts: 2
Joined: 2024-04-03, 13:21 UTC

Re: New SFTP plugin available now

Post by *juliusjoestar »

Are there any plans to implement multi-threaded concurrent transfer? My ISP throttles a single connection, so I'm able to fully utilize the available bandwidth only by using WinSCP or FileZilla
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

The plugin already supports multi-threaded transfers. In F5/F6 window, tick the checkbox "copy in background (separate window)".
juliusjoestar
Junior Member
Junior Member
Posts: 2
Joined: 2024-04-03, 13:21 UTC

Re: New SFTP plugin available now

Post by *juliusjoestar »

In my workflow I usually have to transfer a single large file, up to ~100GB. Forgot to mention that, sorry. So the "copy in background" option is useless in this case.
Beam
New Member
New Member
Posts: 1
Joined: 2024-04-12, 04:05 UTC

Re: New SFTP plugin available now

Post by *Beam »

ghisler(Author) wrote: 2024-02-29, 10:34 UTC I was able to reproduce the problem with OpenWRT!
Sorry for my English.
Dear author, it's me found the error with the exclamation mark, and Flint posted it here. In version sftpplug310b5 2024-02-29 everything works correctly, but in version https://www.ghisler.com/plugins.htm from 2023-03-24 the error is present.
I also want to add that there is no error on Android+TC+SFTP plugin with the same parameters for connecting to the same server.
Post Reply