New SFTP plugin available now
Moderators: Hacker, petermad, Stefan2, white
Of course, you can't.Mikefield wrote:4. Could not confirm. Checked here only with tcpview from sysinternals, but the connection is
closed on the client side.

Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
Tested the plugin version 06 on Windows XPSP2 with TC 6.56. Seems to be working quite fine, including UTF8 (however, in my case Auto-Detect did not detect UTF8 so I had to put it manually) but I found that when I set the user rights (chmod or filemod) of files to "666" in options, files are nevertheless uploaded to the server with the attributes "644". (sftpplug.ini also shows filemod=666). Is this a bug or something I missed?
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Beta 0.7 is available now in the first message of this thread! Please update! Here is the list of additions and fixes:
- Read contents of HOME environment variable when double clicking on pseudo link "~" in root or home dir
- Allow user to break out of plugin root (e.g. servername.com/home/username) when following a link
- English properties dialog had default locale (which is Swiss German on my system)
- Socket was not closed after shutting down SFTP connection
I found a solution for symbolic links in my plugin, though: If the link would go somewhere outside of the current plugin root, the plugin will show a warning that the plugin root will be set to the root of the file system. The downside is that the history will not work then because the paths are completely different after changing the root.
I have also added a pseudo link named "~" both to the root and the home dir, which brings the user to his home directory. This is done by reading the HOME environment variable, and if it fails, by going to /home/<loginname> directly.

- Read contents of HOME environment variable when double clicking on pseudo link "~" in root or home dir
- Allow user to break out of plugin root (e.g. servername.com/home/username) when following a link
- English properties dialog had default locale (which is Swiss German on my system)
- Socket was not closed after shutting down SFTP connection
I couldn't get that to work with the old plugin, how was it solved there? I mean, when you were in \\secure ftp\server\ and pressed Enter on [..], you landed in \\secure ftp and not in the parent dir on the server...With the old plugin it's possible. This is why the user ask for it.
I found a solution for symbolic links in my plugin, though: If the link would go somewhere outside of the current plugin root, the plugin will show a warning that the plugin root will be set to the root of the file system. The downside is that the history will not work then because the paths are completely different after changing the root.
I have also added a pseudo link named "~" both to the root and the home dir, which brings the user to his home directory. This is done by reading the HOME environment variable, and if it fails, by going to /home/<loginname> directly.
Unfortunately I don't have access to a VPN connection, so I cannot test this, sorry. Can anyone reproduce this problem with a direct connection to the server?But the "Cancel" doesn't bring Total Commander back to live. When the VPN connection brokes
there is no way to cancel the transfer.
No, FXP does not exist with SSH. With SSH, both the commands and the transfers all go through the same encrypted tunnel between client and server. There is no way to make a direct tunnel between two servers.Does this plug-in support FXP?
Thanks for the warning, it was indeed still set to the system default (Swiss German).The File Properties dialog is shown in German here.

I'm sorry but that's not under the control of the plugin.It would be more logical for the users if pressing Disconnect while in plugin's root directory terminated all currently active connections instead of just closing the plugin panel.
You seem to be right - I assumed that the sftp close would also close the socket, but apparently it doesn't. I have added that now.Connections to one of the computers I tested SFTP with are not closed by TC when I disconnect
Well, it's F7 because you have to create a new pseudo folder!when I see F7=new connection.txt it looks for me like a button F7 MkDir
Probably yes, it's Windows which chooses the language from the resources, not the plugin. I don't know of any manual way to choose it, otherwise I would offer it as an option. Does anyone have an idea on how to do it?How can I force the plugin to be in english ? (Windows 2k french) ...Do I have to remove all the -french ressource part- ?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Confirm the fix.ghisler(Author) wrote:Thanks for the warning, it was indeed still set to the system default (Swiss German).

I checked beta 7 and confirm that the connection is now closed with that server too. Thanks!ghisler(Author) wrote:You seem to be right - I assumed that the sftp close would also close the socket, but apparently it doesn't. I have added that now.Connections to one of the computers I tested SFTP with are not closed by TC when I disconnect
I meant that it is unusual to have text files in a plugin like that. For me this file looks like a pseudo-file executing some command (creating a new connection), and when I click it and see text file contents in my editor intead of command executing… well, it's a bit confusing.ghisler(Author) wrote:Well, it's F7 because you have to create a new pseudo folder!when I see F7=new connection.txt it looks for me like a button F7 MkDir
Well, as I posted here, I confirm TC hangup, and I use direct connection in local network (and one of the servers was even locally installed virtual machine).ghisler(Author) wrote:Unfortunately I don't have access to a VPN connection, so I cannot test this, sorry. Can anyone reproduce this problem with a direct connection to the server?But the "Cancel" doesn't bring Total Commander back to live. When the VPN connection brokes
there is no way to cancel the transfer.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
The chmod attributes problem I described a few posts ago seems still to be there in 0.7 beta. Even when I changed the string "644" (the offered default value) to "666" in *.wfx in hex, the files are still written to the server as "644". I also think it would be a good idea to show chmod operations in the log.
ghisler(Author) wrote:- Read contents of HOME environment variable when double clicking on pseudo link "~" in root or home dir
- Allow user to break out of plugin root (e.g. servername.com/home/username) when following a link
I couldn't find the pseudo link "~" how can it be used?
ghisler(Author) wrote:I couldn't get that to work with the old plugin, how was it solved there? I mean, when you were in \\secure ftp\server and pressed Enter on [..], you landed in \\secure ftp and not in the parent dir on the server...
The \\secure ftp\server\ is the root dir of the server, not the home dir. It's correct that you landed in \\secure ftp .
But, when in the new plugin, home dir is set to \\secure ftp\server\var\, then it is not possible to go to \\secure ftp\server\
when pressed Enter on [..] in \\secure ftp\server\var\! That is the problem.
The old sftp plugin connects always to the root dir \\secure ftp\server\.
To enter the home dir it uses the "cd" command to go to the home dir.
Let me explain how I understand the differences from the plugins.
old plugin:
1st: Plugin connect to \\secure ftp\server\ Port 22 -> server root dir
2nd: Plugin send "cd /var" -> server home dir where I wish to land in after connect
3rd: I press Enter on [..] once to go back to \\secure ftp\server\ -> root dir
Result: Enter the parent dir on the server \\secure ftp\server\ is possible.
new plugin:
1st: Plugin connect to \\secure ftp\server\var\ Port 22 -> server home dir where I wish to land in, not server root dir
2nd: I press Enter on [..] once, go back to \\secure ftp it is not possible to go to \\secure ftp\server\ -> server root dir
Result: Enter the parent dir on the server \\secure ftp\server\ is not possible.
ghisler(Author) wrote: I found a solution for symbolic links in my plugin, though: If the link would go somewhere outside of the current plugin root, the plugin will show a warning that the plugin root will be set to the root of the file system. The downside is that the history will not work then because the paths are completely different after changing the root.
I have also added a pseudo link named "~" both to the root and the home dir, which brings the user to his home directory. This is done by reading the HOME environment variable, and if it fails, by going to /home/<loginname> directly.
See above, I couldn't found this link.
ghisler(Author) wrote:Unfortunately I don't have access to a VPN connection, so I cannot test this, sorry. Can anyone reproduce this problem with a direct connection to the server?
Flint just answers. When I back from vacation on monday, I can test at work too if needed.
mf
Bankster - Word of the Year 2009
Canceling an upload sets the view in SFTP panel to a local drive. I need to Alt+Down to go back.
Resuming an aborted upload just hangs.
Going to already visited dirs has some problems: no file listing or even doubled items - screenshot.
All the above tested on Cygwin SFTP server. I'll try to test on a real Linux box and post the results.
Resuming an aborted upload just hangs.
Going to already visited dirs has some problems: no file listing or even doubled items - screenshot.
All the above tested on Cygwin SFTP server. I'll try to test on a real Linux box and post the results.
TC for Linux please!
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I could reproduce it now too. It seems that libssh2_sftp_read hangs for quite a while when I pull out the LAN cable of the router during a download - but it eventually returns. The problem is the then following call to libssh2_sftp_close, which hangs forever. I will put another abort check and a 5 second timeout in that call to avoid the hang.Well, as I posted here, I confirm TC hangup, and I use direct connection in local network
I'm sorry, I didn't see your original post. It's really strange, I'm setting the file mode when creating the remote file with libssh2_sftp_open. I'm sure that it worked some time in the past, but strangely it doesn't work in any older version. I will therefore initially create the file with mode=0644 and change the mode after closing the file.The chmod attributes problem I described a few posts ago seems still to be there in 0.7 beta. Even when I changed the string "644" (the offered default value) to "666" in *.wfx in hex, the files are still written to the server as "644".
You can only see it when connecting directly to the root or to /home on the server. TC will show the "~" link in the directory listing then. TC will show just the "~" link when listing of these dirs is forbidden.I couldn't find the pseudo link "~" how can it be used?
I still don't understand how this should work! When you connect like this, then after step 3 you are inLet me explain how I understand the differences from the plugins.
old plugin:
1st: Plugin connect to \\secure ftp\server\ Port 22 -> server root dir
2nd: Plugin send "cd /var" -> server home dir where I wish to land in after connect
3rd: I press Enter on [..] once to go back to \\secure ftp\server\ -> root dir
Result: Enter the parent dir on the server \\secure ftp\server\ is possible.
\\secure ftp\server\
and the plugin shows the contents of /var . But when you now press Enter on [..], Total Commander will return to
the list of connections (\\secure ftp) !
This happens when the server still hangs from the aborted transfer, so the plugin gets an error back when requesting the file list. I will try to wait a bit longer for libssh2_sftp_close when the user presses ESC. Currently only clicking on the abort button will abort the transfer gracefully.Canceling an upload sets the view in SFTP panel to a local drive. I need to Alt+Down to go back.
I will check that.Resuming an aborted upload just hangs.
Sorry, cannot reproduce. TC does not cache the dirs.Going to already visited dirs has some problems: no file listing or even doubled items
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
At step 3, the plugin shows the content of \\secure ftp\server\ not of \var.ghisler(Author) wrote:I still don't understand how this should work! When you connect like this, then after step 3 you are inLet me explain how I understand the differences from the plugins.
old plugin:
1st: Plugin connect to \\secure ftp\server\ Port 22 -> server root dir
2nd: Plugin send "cd /var" -> server home dir where I wish to land in after connect
3rd: I press Enter on [..] once to go back to \\secure ftp\server\ -> root dir
Result: Enter the parent dir on the server \\secure ftp\server\ is possible.
\\secure ftp\server\ and the plugin shows the contents of /var . But when you now press Enter on [..],
Total Commander will return to the list of connections (\\secure ftp) !
Home dir is used, that the plugin goes to a specified directory, which I don't want enter manually.
But it's needed to go back to the server root.
mf
Bankster - Word of the Year 2009
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
You mean the plugin goes by itself to \\secure ftp\server\var when connecting? How does it dow that? The plugin interface does not support it...At step 3, the plugin shows the content of \\secure ftp\server\ not of \var.
Home dir is used, that the plugin goes to a specified directory, which I don't want enter manually.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Yepp! When the plugin is connected to the server, e.g. \\secure ftp\server\, it send theghisler(Author) wrote:You mean the plugin goes by itself to \\secure ftp\server\var when connecting? How does it dow that? The plugin interface does not support it...At step 3, the plugin shows the content of \\secure ftp\server\ not of \var.
Home dir is used, that the plugin goes to a specified directory, which I don't want enter manually.
command "cd /var". That's all. The /var is set in the configuration, field "homedir" in the old plugin.
mf
Bankster - Word of the Year 2009
-
- Junior Member
- Posts: 4
- Joined: 2008-08-15, 09:13 UTC
Changing into a directory with a name containing UTF8 characters still gives "Failed opening remote file". Could anybody, please, confirm this to be sure that this is not due to some server misconfiguration on my side? Thanks!Beta 0.7 is available now in the first message of this thread! Please update! Here is the list of additions and fixes:
I second the idea to connect to the root directory and cd'ing to the dir set in the connection settings subsequently. This gives max degrees of freedom. If the server admin does not want you to see root he will chroot the ssh server. And if listing root directory is forbidden (as on one of our servers) and no dir is set in connection settings, the plugin could cd to ~.Mikefield wrote: Yepp! When the plugin is connected to the server, e.g. \\secure ftp\server\, it send the
command "cd /var". That's all. The /var is set in the configuration, field "homedir" in the old plugin.
Thanks! Best,
Bash