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
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Dalai wrote: 2023-08-01, 12:30 UTC
JOUBE wrote: 2023-08-01, 06:42 UTC (Unix based = ?, Linux = OpenSSH based, Windows based = Openssh based (pre w10 = ?), Mac = ?) I will check that (with some other ssh Server). Version 2.
Who says there's only OpenSSH for Linux? Dropbear is another SSH server for Linux, a very lightweight one that is primarily used in embedded systems
Dropbrear - if it contains ssh - _never_ contains its own SFTP server, but the corresponding SFTP server from Openssh is configured for it.

See e.g. : https://linuxexplore.com/how-tos/sftp-secure-file-transfer-protocol-with-dropbear/
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Dalai wrote: 2023-08-01, 12:30 UTC And I'm pretty sure there are other SSH servers for Linux. And don't forget FreeBSD, NetBSD, HP-UX, Sun and other systems with a different architecture and software packages. All of them could behave differently, deliver different outputs and so on.
I think you don't know the history of SSH. Please count in detail which implementations (packages) use the systems mentioned by you:
User avatar
Dalai
Power Member
Power Member
Posts: 9425
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

JOUBE wrote: 2023-08-01, 12:39 UTCDropbrear - if it contains ssh - _never_ contains its own SFTP server, but the corresponding SFTP server from Openssh is configured for it.
While this might be true, it doesn't really matter. Are you aware that the SFTP plugin can also use SCP for its directory listings and even for transfers? And since we are talking about getting the user names, we are talking about directory listings, regardless of how they're generated.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Dalai wrote: 2023-08-01, 13:09 UTCAre you aware that the SFTP plugin can also use SCP for its directory listings and even for transfers? And since we are talking about getting the user names, we are talking about directory listings, regardless of how they're generated.
? It seems that you have not understood what is currently being discussed in this part of the thread: With findfirst/findnext exactly this directory list is retrieved. In this part of the thread, the question to ghisler(author) is not about the transfer of files but about the information that you get when you call findfirst/findnext. And within there are also data that are useful but has to be interpreted. This is why ghisler(author) is now being requested here to use them. A simple log (for example from a MAC/xBSD/... from me also Fli4l *) ) will clearly solve this.

Joube

*) Which uses dropbrear for ssh -> which uses openssh-sftp-server for sftp.

PS.: As you can see in the log some post above: Also windows uses the given information format, although they send neither a real user nor group (but - - instead, but uses the format) and also have a different rights management (but uses the format).
User avatar
Dalai
Power Member
Power Member
Posts: 9425
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

JOUBE wrote: 2023-08-01, 13:36 UTCIt seems that you have not understood what is currently being discussed in this part of the thread
I have understood that perfectly. But it seems you insist that the plugin requires an SFTP server to connect to. That's not the case. I have been using this plugin to connect to my Fli4l box - which DOES NOT have an sftp-server executable - for many years now. In other words, the directory listing is fully handled by Dropbear itself (at least in this case), not some external SFTP server executable. And the output from this server can be different from OpenSSH, but I haven't checked that. I just wanted to make sure that you understand that SSH servers' outputs can vary and there have been such cases in the past with some (lesser known?) SSH servers. Similarly to FTP server outputs that also vary.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Dalai wrote: 2023-08-01, 14:02 UTC
JOUBE wrote: 2023-08-01, 13:36 UTCIt seems that you have not understood what is currently being discussed in this part of the thread
using this plugin to connect to my Fli4l box
This is perfect: Please enable the option "Schreibe komplette Verzeichnislisten in Logdatei (für Fehleranalyse)" in the configuration of that connection. connect, disconnect and send a part (2 or three lines) of that log (tcftp.log) of that connection to this thread. Do _not_ change anything else in the configuration of the connection. Thanks. (To do this it takes only a few minutes. Thanks.)

Joube
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Dalai wrote: 2023-08-01, 14:02 UTCbut I haven't checked that.
I ask for it. Will you contribute and send some lines from the log?

Joube
User avatar
Dalai
Power Member
Power Member
Posts: 9425
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

It's weird that a log file is created only after enabling the FTP log, not the log file option which can also log file-sytem plugins.

Anyway, it's not even necessary to create a log file, the (detailed) output can be grabbed from TC's log window above the panels. Here's what I got:

Code: Select all

Verbinden mit: <redacted>
IP address: <redacted>
Server-Fingerabdruck:
<redacted>
Unterstützte Authentifizierungsmethoden: publickey,password
Auth via public key for user: root
CONNECT \<redacted>
Verzeichnis einlesen: \
ls -la --time-style="+>>%Y%m%d_%H%M%S" /
ls
export LC_ALL=C
ls -la /
drwxr-xr-x   18 root     root           400 Jul 29 20:14 ..
-r--r--r--    1 root     root          1170 Jul 29 09:27 .profile
drwxr-xr-x    2 root     root          1240 Jul 29 09:28 bin
drwx------    4 root     root         16384 Jan  1  1970 boot
drwxr-xr-x    9 root     root          3072 Aug  1 18:05 daten
drwxr-xr-x   10 root     root          4700 Jul 29 09:27 dev
drwxr-xr-x   19 root     root          1280 Jul 29 15:36 etc
lrwxrwxrwx    1 root     root            12 Dec 21  2022 init -> /bin/busybox
drwxr-xr-x    4 root     root           580 Jul 29 09:27 lib
drwxr-xr-x    2 root     root            40 Dec 21  2022 mnt
dr-xr-xr-x   71 root     root             0 Jul 29 09:27 proc
drwxrwxrwt    6 root     root           140 Jul 29 09:27 ramdisk
drwx------    6 root     root           180 Jul 29 10:18 root
drwxr-xr-x    2 root     root           840 Jul 29 09:27 sbin
drwxr-xr-x    3 root     root            60 Dec 21  2022 srv
dr-xr-xr-x   12 root     root             0 Jul 29 09:27 sys
drwxrwxrwt    3 root     root            60 Aug  1 18:55 tmp
drwxr-xr-x    8 root     root           160 Jul 29 09:27 usr
drwxr-xr-x   10 root     root           200 Jul 29 09:27 var
Note that (this version of) Busybox does NOT support the --time-style parameter. It's "coincidence" that the output above is more or less identical to what a modern bash produces. And that's the thing: If the output depends on the shell (it's Busybox's ash on this system) and ls command, you can expect very different results on different platforms and systems.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Thanks for the log.

In this part of the thread, everything around the user/group request is of no interest at all, because the plugin is already handling it satisfactorily.

It is only about the additional consideration of the information already available in the data about user and group including its own column for this in the full view within the panel of the Tc. If the data exist and it can be assumed they exist, they should be presented. It's all about this. This may be of less interest on some systems, but for the most it is helpful and useful.

I'll put a tick behind drobbear, busybox, (including Fli4L) as far as user and group are concerned. (and POSIX (including (Sun)Solaris) and all other Unix-like systems incl BSD Linux). If information about user and group is not there as espected (or a '-' like from windows), show columns as it is (blank or - or ...). But show columns user and group in full view.

Joube
CoolWater
Power Member
Power Member
Posts: 738
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

This cannot be done in full view since TC retrieves the data via WIN32_FIND_DATA(W) structure. This structure doesn't offer parameters for user or group name.

But it can be done via custom columns. I've implemented this feature but I'm still testing.

@ghisler:
There seems to be a bug/missing feature in TC. In custom columns view: When specifying [=tc.Attributstr], TC does not resolve this. Instead, it shows "----". Can you check this, please?

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

Re: New SFTP plugin available now

Post by *ghisler(Author) »

[=tc.Attributstr] only works in the file system, not in plugins. It only shows the attributes
- read only
- archive
- hidden
-system
- NTFS-compressed
- NTFS- encrypted.
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 738
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

Ok, so there is no way to show the attributes column in custom column view like it is shown in full view? i.E. "-750"

Maybe then, [=tc.Attributstr] should not be selectable in custom column view config?
JOUBE
Power Member
Power Member
Posts: 1488
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

CoolWater wrote: 2023-08-02, 17:00 UTC Ok, so there is no way to show the attributes column in custom column view like it is shown in full view? i.E. "-750"

Maybe then, [=tc.Attributstr] should not be selectable in custom column view config?
If you open the configuration of custom colums within the full view of the sftp plugin you will see the text: "This plugin does not support custom columns". So, there is no need to change anything at this point. User and Group has to be added to the full view within the sftp plugin by the sftp plugin itself. And this is possible and easy to implement. And - additional (unlike file time and file rights) - the change of user and group had to be handled at the tc commandline via shell commands, as it is already possible now.It is therefore only about the display of user and group.

Joube
CoolWater
Power Member
Power Member
Posts: 738
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

It seems to me that you didn't get the point.

1. As I wrote before, the data exchange between TC and the plugin is done via WIN32_FIND_DATA(W) structure. But it doesn't offer any parameters to exchange the information of user and group names.

2. The plugin has no influence on the displayed columns and it doesn't know which columns are displayed. This is all up to TC.

So the only way is using custom columns view which of course needs to be implemented by the plugin.

It's not about retrieving the information. Both SCP and SFTP offer these information.

CoolWater
User avatar
Dalai
Power Member
Power Member
Posts: 9425
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

CoolWater wrote: 2023-08-03, 09:52 UTC1. As I wrote before, the data exchange between TC and the plugin is done via WIN32_FIND_DATA(W) structure. But it doesn't offer any parameters to exchange the information of user and group names.
Well, nobody said that the user/group information should be shown in TC's Full view because that's impossible. The only (logical) place to show such information is custom columns. Information shown in those are not retrieved via this data structure but by a call to the functions FsContentGetSupportedField and FsContentGetValue.
2. The plugin has no influence on the displayed columns and it doesn't know which columns are displayed. This is all up to TC.
Not entirely true. A WFX plugin can provide a default custom columns configuration and TC can get that configuration by a call to FsContentGetDefaultSortOrder and FsContentGetDefaultView functions, and load that default custom columns view when the plugin is loaded/entered. My Services2 plugin does exactly that.

Anyway, let's wait for Ghisler to implement custom columns in this plugin. Until then let's have some tea ;).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply