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: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why bindiff? The source is available! Btw, the directory listing seems to work now:
https://plugins.ghisler.com/fsplugins/sftp/
Author of Total Commander
https://www.ghisler.com
totalcmd16a
Junior Member
Junior Member
Posts: 9
Joined: 2013-09-09, 04:15 UTC

Post by *totalcmd16a »

ghisler(Author) wrote:Why bindiff? The source is available! Btw, the directory listing seems to work now:
https://plugins.ghisler.com/fsplugins/sftp/
Hi boss:
I found the root cause.....
I forget put zlibwapi.dll in the folder. and the web readme don't wrote that.... so....
many thanks for your help.
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

Hi,

I like to suggest to add parsing of standard URL when call to the plugin using "CD" comand or the TOTALCMD.EXE command line parameter "\\\Secure FTP\"

See my original post at "Total Commander Forum Index -> TC suggestions (English) -> Command line parameter to PLUGINS"

Code: Select all

Post at page #59 of this thread suggest to use the form:
cd \\\pluginname\servername\home\user\subdir
But this don't work at time in my trials. Aso, isn't good to call from external program to open a connection.

Please, Ghisler, can you add support for standrd URL sintax?

I like to connect using: "sftp://[user:password@]host[:port]/~/directorypath/;type=d"
where ";type" can be any parameter to the plugin (for example, force to use pageant adding ";useagent=1")

Thank you!
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

Hi,

I review the source code of SFTP and WebDAV plugins. I found the functions "FsFindFirst" of both plugins. In both, no parameters are parsed as URLs. You can only "open" or "load" previous sessions.

I suggest to upgrade these functions to parse a URL for QuickConnect from DIRECTORY parameter. The sintax can be:

Code: Select all

CD "\\\WebDAV\@https://[user:password@]host[:port]/~/directorypath/;type=d"

CD "\\\Secure FTP\@sftp://[user:password@]host[:port]/~/directorypath/;type=d"
You can use cURL lib to parse the URL. Moreover, I suggest to change the name of the SFTP plugin to remove the space (why "Secure FTP" instead of "SFTP" ? )

Ghisler, you agree this proposal? :wink:
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6490
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

inforte43 wrote:Hi,
...
You can use cURL lib to parse the URL. Moreover, I suggest to change the name of the SFTP plugin to remove the space (why "Secure FTP" instead of "SFTP" ? )
Ghisler, you agree this proposal? :wink:
Secure FTP and SFTP are completly different protocols !
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

Hi, I only like to say: "use existing code to parse the URL" (perhaps citation of cURL here is a mistake!). You don't need to type all the code, just use a library for pasing the URL.

After review your plugins, I see that you include (for your convenience) similar code in "multiserver.*" files. You can include in this file a call to a simple URL parser. And after initialization send the received string with the PATH to the URL parser IF IT CONTAINS THE CORRECT TOKEN. As I suggest, "\\\_PLUGIN_NAME_\@...bla,bla". So if the string starts with "@" you call to the parser.

I feel this option to start plugins using URL very fexible. I'll be very happy if you add this functionality (or similar) in your SFTP/WebDAV plugins. :wink:

Thank you for your support!
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

Horst.Epp wrote:
inforte43 wrote:Hi,
...
Moreover, I suggest to change the name of the SFTP plugin to remove the space (why "Secure FTP" instead of "SFTP" ? )
Ghisler, you agree this proposal? :wink:
Secure FTP and SFTP are completly different protocols !
Hi Horst.Epp,

I'm confused! FTPS is FTP with Encryption (implicit or explicit). SFTP is file transmission over SSH. Right?

So, this is from the source code from SFTP plug-in (https://plugins.ghisler.com/fsplugins/sftpplug_src.zip):

Code: Select all

sftpplug.cpp :

00018:  char pluginname[]="SFTP";
00019:  char defrootname[]="Secure FTP";
This is the reason to suggest change the name of the plugin from "Secure FTP" to "SFTP".

Or I did miss something? :shock:
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

inforte43 wrote:This is the reason to suggest change the name of the plugin from "Secure FTP" to "SFTP".
I believe the name "Secure FTP plugin" was chosen to differentiate between the SFTP plugin. This thread begins with: "Because of the stopped development of the old SFTP plugin.."
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

white wrote:
inforte43 wrote:This is the reason to suggest change the name of the plugin from "Secure FTP" to "SFTP".
I believe the name "Secure FTP plugin" was chosen to differentiate between the SFTP plugin. This thread begins with: "Because of the stopped development of the old SFTP plugin.."
Hi White,
Perhaps you're right. But who is using now old AND new plugin? If the PROTOCOL is SFTP, the correct name of the plugin needs to be SFTP, right?

But focusing in my petition: Ghisler, please, you agree to add URL parsing as user path?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, there was already a plugin, which was based on "puTTY" code instead of openssh dlls used by my plugin.

Regarding the path - that's an interesting idea, I will consider it.
Author of Total Commander
https://www.ghisler.com
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

ghisler(Author) wrote:Regarding the path - that's an interesting idea, I will consider it.
THANK YOU! :D
User avatar
tom*de
Senior Member
Senior Member
Posts: 394
Joined: 2003-02-25, 09:21 UTC

umask

Post by *tom*de »

New copied files are created on linux systems with default permissions: (-rw-r--r--)

Can I configure the sftp plugin version 1.3 that copied files are created with umask 007 (-rw-rw ----) by default?
Tom - #81178 - 5 User licence - Klugheit, Gerechtigkeit, Tapferkeit und Mäßigung plus Kooperation.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1013
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You can set the default file and folder rights in the connection properties. Not exactly umask but unless you copy from linux to linux the x bit shouldn't mattern.
User avatar
tom*de
Senior Member
Senior Member
Posts: 394
Joined: 2003-02-25, 09:21 UTC

Post by *tom*de »

where can I find the connection properties? keyword in sftpplug.ini?
Tom - #81178 - 5 User licence - Klugheit, Gerechtigkeit, Tapferkeit und Mäßigung plus Kooperation.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, press Alt+Enter or right click - properties on a connection.
Author of Total Commander
https://www.ghisler.com
Post Reply