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
apprentice
New Member
New Member
Posts: 1
Joined: 2018-03-26, 11:24 UTC
Location: de-de

License

Post by *apprentice »

Hello Mr. Ghisler and everybody else who is interested in this topic :)

How is the license-"state" on this plugin?
Is it under any license or may I deploy it to Shareware-Users?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's free and open source, you may distribute it and even re-use my code.
Author of Total Commander
https://www.ghisler.com
tmcdos
Junior Member
Junior Member
Posts: 30
Joined: 2006-05-22, 18:29 UTC
Location: Sofia, Bulgaria
Contact:

Post by *tmcdos »

Were you able to find a solution for symlinks not working in SCP-only mode ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It is supported if the server supports stat -L and readlink -f commands. You can try it on the command line: Go to a directory with links, then try:
stat -L linkname
readlink -f linkname
/usr/bin

It should give an output in the log like this:

Code: Select all

stat -L bin
  File: 'bin'
  Size: 36864     	Blocks: 80         IO Block: 4096   directory
Device: 902h/2306d	Inode: 9437188     Links: 2
Access: (0555/dr-xr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-03-07 17:15:34.156713139 +0100
Modify: 2018-03-21 09:16:46.775942373 +0100
Change: 2018-03-21 09:16:46.775942373 +0100
 Birth: -

readlink -f linkname
/usr/bin
The stat command is used to determine whether the link points to a file or to a directory. The readlink command is used to get the link target.
Author of Total Commander
https://www.ghisler.com
tmcdos
Junior Member
Junior Member
Posts: 30
Joined: 2006-05-22, 18:29 UTC
Location: Sofia, Bulgaria
Contact:

Post by *tmcdos »

This is what I get on the server
Image: https://s6.postimg.org/yskgxnrpt/shot-1.png

This is what I get in TC 9.12
Image: https://s6.postimg.org/5q66uv0b5/shot-2.png
mag
Junior Member
Junior Member
Posts: 35
Joined: 2008-10-06, 08:35 UTC

Post by *mag »

In SCP-only mode (Use SCP for everything) symlinks don't work for me either.
In SFTP and partial SCP (Use SCP for data transfers) modes they work partially - I can browse them but copying them elsewhere results in a zero-Byte file of the same name.

Tested against RHEL 6/7 systems which support stat & readlink commands just fine.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Could you try the commands directly in Total Commander itself?
1. Log in to the server
2. Go to the directory with the links
3. On the command line in TC, send the commands:
stat -L web
readlink -f web
4. Double click on the log in the FTP toolbar
5. Copy the log for the above two commands, and paste them here.

Thanks!
Author of Total Commander
https://www.ghisler.com
mag
Junior Member
Junior Member
Posts: 35
Joined: 2008-10-06, 08:35 UTC

Post by *mag »

I realized I didn't use the latest SFTP plugin version during those tests so retested with the latest version (2.0) with slightly different results:

1. SFTP: can browse links, can't copy (error & zero-length file on direct copy attempt, zero-length file when copying the whole upper level directory)
2. SCP for transfers: can browse links, can't copy (error on direct copy attempt, completely skipped when copying the whole upper level directory)
3. SCP for transfers & SCP for everything (both enabled): can browse links, can't copy (error on direct copy attempt, completely skipped when copying the whole upper level directory) - identical to "SCP for transfers"
4. SCP for everything: can browse links, can't copy (TC always hangs - stops responding - and has to be killed)

Result of the requested test (was performed in the "SCP for everything" mode - point 4 above):

Code: Select all

Loading SSH Library
========================
Connecting to: abcit
IP address: 10.2.11.8:22
Server fingerprint:
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
Supported authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password
Authentication via password for user: xyzadmin
Quote: echo $LC_ALL $LC_CTYPE $LANG
Quote: echo $OSTYPE
CONNECT \_Quick Connection
Get directory: \
Get directory: \tmp
Get directory: \tmp\linktest
Quote: stat -L link
  File: ‘link’
  Size: 18        	Blocks: 0          IO Block: 4096   directory
Device: fd00h/64768d	Inode: 101236431   Links: 2
Access: (0755/drwxr-xr-x)  Uid: (  500/xyzadmin)   Gid: (  500/     xyz)
Context: unconfined_u:object_r:user_tmp_t:s0
Access: 2018-04-09 20:48:05.659939748 +0200
Modify: 2018-04-09 20:47:27.080039600 +0200
Change: 2018-04-09 20:47:27.080039600 +0200
 Birth: -
Quote: readlink -f link
/tmp/linktest/directory
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check it, thanks.
Author of Total Commander
https://www.ghisler.com
yetanotherlogin
Junior Member
Junior Member
Posts: 49
Joined: 2010-03-24, 10:51 UTC

Post by *yetanotherlogin »

Hello,

I noticed two issues when trying the SFTP plug-in 2.0.0 2017/11/17 by "Myself" :

1. Unless I missed it, it's impossible to tell the plug-in to cd to a given directory after connecting through SFTP

2. After disconnecting, the user is left in "\\\SecureFTP" and can't cd back to the local filesystem through eg. "c:"

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

Post by *ghisler(Author) »

1. Actually you can, just use an address like this:
www.server.com\home\user\subdir
or
www.server.com:port\home\user\subdir

2. The command line is redirected to the plugin. Just use Alt+F1 or Alt+F2 to change directory.
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 734
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

2ghisler(Author)

libssh2 version >= 1.2.6 supports SCP file transfer with file size > 2 GB. Therefore no fallback to sftp mode is needed anymore.

Regards,
CoolWater
Bozzy
Junior Member
Junior Member
Posts: 15
Joined: 2013-09-10, 15:06 UTC

KeepAlive packets

Post by *Bozzy »

Hi.

Is there any chance we'll have this implemented in the near future? It's something a skilled C++ coder should be able to implement in minutes and it will address a very old issue with connections being lost.

Thank you.
CoolWater
Power Member
Power Member
Posts: 734
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

2Bozzy

I implemented your keep alive feature request. I sent the source code to Christian to release it... :)

Regards,
CoolWater
Bozzy
Junior Member
Junior Member
Posts: 15
Joined: 2013-09-10, 15:06 UTC

Post by *Bozzy »

2CoolWater

Thank you very much! I really appreciate it :)
Post Reply