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
andres992
Member
Member
Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 »

I can confirm that setting user rights work now.

UTF-8 autodetection did not work on the server I use (probably due to some server-side configuration matters). Manual setting for UTF-8 works.
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

andres992 wrote:UTF-8 autodetection did not work on the server I use (probably due to some server-side configuration matters)
Please run the command "set" and "locale" from the commandline within TC and post the output from the (s)ftp log window. This could be helpful for ghisler in order to make it work better.

Regards,
CoolWater
andres992
Member
Member
Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 »

CoolWater wrote:Please run the command "set" and "locale" from the commandline within TC and post the output from the (s)ftp log window.
Checked that, the locale has been erroneously set as "en_GB". The language was set as "en_EE:en_US:en_GB:en". I shall first talk to the server admin and ask him to correct that mistake. What would be the best locale for UTF-8?
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

ghisler(Author) wrote:Beta 0.8 is out now! See the first message for the download links.

The changes are:
- Reconnect to the server if a connection failed and the user tries to access the server again
- Open new SFTP channel for directories, uploads and downloads if an operation was aborted while it was hanging

[...]

It seems that there is a 20 second hang when the network connection is cut. This happens inside the sftp library dll, so I cannot prevent it. However, I can prevent the hang which occurs afterwards in my plugin, so it should be possible to abort a hanging connection now with beta 0.8.

I'm also disconnecting and reconnecting the sftp channel now if the user aborted an operation while there was outstanding data. This seems to be responsible for the double entries some users have experienced.
I've tested and made some measurements with VPN.
If the VPN breaks during file transfer, it needs 70 seconds til the plugin reports it and stops the transfer.
If I press cancel before, it needs 5 sec shorter than, til the transfer is stoped.
In both situations, the Server is not disconnected by the plugin!
Follow problems occur when the VPN is up again, the Server is not reconnected:
When the file transfer is started again -> TC hangs.
When I use "reread source", the plugin is in a loop and rereads
the directory again and again, but cancel is possible.
Without a file transfer, the plugin dosn't detect, that the connection is lost.

mf
Bankster - Word of the Year 2009
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

Quote:
If the folder does not exists, TC shows me the local folder I was at before starting SFTP.


Unfortunately there isn't currently a way to change directories withing the FsFindFirst function, so the plugin cannot go somewhere else if directory reading fails. This is a limitation of the plugin interface, sorry.
Not sure if I completely understand. Can't it stay where I am instead of going back to my local folder? If not, how can I get back into the active connection? The tab with the active connection now shows my local folder.
Registered user #92105
shammat
Senior Member
Senior Member
Posts: 253
Joined: 2003-04-11, 23:13 UTC

Post by *shammat »

Maybe I'm missing something very obvious. But how can I create and maintain SFTP connections? The regular FTP dialog does not have any additional options after installing the plugin
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

shammat wrote:Maybe I'm missing something very obvious. But how can I create and maintain SFTP connections? The regular FTP dialog does not have any additional options after installing the plugin
For all filesystem plugins: Go to Network neigborhood. In this case Network neigborhood -> Secure FTP...

Regards,
CoolWater
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

There is a readme bundled with the plugin.
Impressive question, for a TC user being registered in the forum for more than five years and more than 200 postings. Is there any chance that you have been kidding? Please... :shock:

Icfu
This account is for sale
User avatar
ado
Senior Member
Senior Member
Posts: 445
Joined: 2003-02-18, 13:22 UTC
Location: Slovakia, Pezinok

Post by *ado »

Christian,
I have to congratulate you - it is amazing how it works. I expect that you are receiving tons of suggestions and request for this plug-in so here are another two:
1. file properties: we have Solaris 10 servers and all I see is "ksh: stat: not found". I checked with our SA and we simply do not have "stat" command. Can you use in this case something like "ls -al filename" instead of "stat"?
2. If I am accessing our servers via ssh, I have to use always sudo (ss -u account) once I login, otherwise whole file system (except my home dir) is for me just read only. It would be great if you can implement this "sudo" via sftp (if it is possible)

thank you

ado
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, the panel with the sftp connection is active when pressing the disconnect button. but here, it doesn't matter which panel is active.

But... this only happens when showing the connection list... iirc christian mentioned it somewhere as not solvable at the moment...
Indeed this needs a change in Total Commander itself (clearing the icon cache), the plugin cannot do anything.
UTF-8 autodetection did not work on the server I use (probably due to some server-side configuration matters). Manual setting for UTF-8 works.
The plugin uses the command
echo $LC_ALL $LC_CTYPE $LANG
and then
locale
and looks for UTF-8 in both to check for UTF-8. If anyone knows a better way to detect it, please let me know!
I've tested and made some measurements with VPN.
If the VPN breaks during file transfer, it needs 70 seconds til the plugin reports it and stops the transfer.
I couldn't test this with a VPN, but with a normal internet connection I unplugged the LAN cable between the router and cable modem during a connection. The effect was that all the SFTP functions were hanging within the SFTP library dll for about 20 seconds, although I had set it to non-blocking mode. Therefore I fear that there is nothing I can do about these hangs. You will need to kill TC via task manager, sorry.
Can't it stay where I am instead of going back to my local folder?
No it can't, sorry. When reading from the plugin fails, TC switches to a local drive because it assumes that loading from other dirs may fail too. Just use the history (Alt+Cursor left) to go back.
1. file properties: we have Solaris 10 servers and all I see is "ksh: stat: not found". I checked with our SA and we simply do not have "stat" command. Can you use in this case something like "ls -al filename" instead of "stat"?
Yes, I can do that, but it would not give the same details as stat. Any other suggestions?
2. If I am accessing our servers via ssh, I have to use always sudo (ss -u account) once I login, otherwise whole file system (except my home dir) is for me just read only.
How do you send that? Via the command line? If yes, I could add an option "send commands when connecting". Would this help?
Author of Total Commander
https://www.ghisler.com
shammat
Senior Member
Senior Member
Posts: 253
Joined: 2003-04-11, 23:13 UTC

Post by *shammat »

icfu wrote:There is a readme bundled with the plugin.
Impressive question, for a TC user being registered in the forum for more than five years and more than 200 postings. Is there any chance that you have been kidding? Please... :shock:

Icfu
Not kidding. I have not used a filesystem plugin before to be honest.
I faintly recalled it must be something like "go to a special folder", but there is no menu item that would bring me there. In fact I need to add a new command button to the button bar in order to be able to go to "Network Neighborhoo". Why isn't this available in the menu? It would expect something like that in the "Net" menu

This is not very userfriendly. Once this plugin is stable, couldn't this be merged into the normal FTP dialog? After all a new user would definitely look there.
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

Did you have enabled "show drive buttons" in Configuration -> Layout?
If yes, the last right button, called Network Neighborhood, with the \ in the icon,
is the right button. :)
It is also possible to get the Network Neighborhood over the drive combobox [-\-].
I think the most user will use an separate button for the plugin.

mf
Bankster - Word of the Year 2009
User avatar
ado
Senior Member
Senior Member
Posts: 445
Joined: 2003-02-18, 13:22 UTC
Location: Slovakia, Pezinok

Post by *ado »

ghisler(Author) wrote:
1. file properties: we have Solaris 10 servers and all I see is "ksh: stat: not found". I checked with our SA and we simply do not have "stat" command. Can you use in this case something like "ls -al filename" instead of "stat"?
Yes, I can do that, but it would not give the same details as stat. Any other suggestions?
Unfortunately I do know know what kind of details you provide in that properties dialog - never saw it populated with real data. But I see based on labels that all this is available also in "ls -al". Anyway - to display result of that "ls" is still way better that "ksh: stat: not found" ;-)

Code: Select all

rwuser:qaDS3> ls -al setupEnv.ksh
-rwxr--r--   1 rwuser   rwgroup     1000 Sep 24  2007 setupEnv.ksh
rwuser:qaDS3>
ghisler(Author) wrote:
2. If I am accessing our servers via ssh, I have to use always sudo (ss -u account) once I login, otherwise whole file system (except my home dir) is for me just read only.
How do you send that? Via the command line? If yes, I could add an option "send commands when connecting". Would this help?
It sounds like a good idea - or at least I'd say it is worth of try it (if it is not going to take a week of your time ;-).
This is how it looks like via ssh (not sftp - therefore I am not sure if it can work)

Code: Select all

ado:qaDS3>who am i
ado        pts/1        Sep  3 18:07    (xxxxxxxxxxxxxx.xxxx.xxx.xx.com)
ado:qaDS3>ss -u rwuser
Script started, file is /var/run/sudoscript/xxx.ado_rwuser_5307/ado5307.fifo
Machine: xxxxxxxxx, SunOS 5.10, built 14 Jan 2008
Build: xxx.xx.xx.com

rwuser:qaDS3> who am i
rwuser   /dev/pts/2   Sep  6 00:56
rwuser:qaDS3>
thank you

ado
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

2ado

does it work correctly when you put ss -u xyz into tc commandline when you're connected to your box? I'm not quite sure, but iirc you need to provide a password for sudo, at least on debian systems... If so, things are getting more complicated then ;)

Regards,
CoolWater
TWatcher
Junior Member
Junior Member
Posts: 43
Joined: 2008-08-26, 18:46 UTC

Post by *TWatcher »

ghisler wrote:
2. If I am accessing our servers via ssh, I have to use always sudo (ss -u account) once I login, otherwise whole file system (except my home dir) is for me just read only.
How do you send that? Via the command line? If yes, I could add an option "send commands when connecting". Would this help?
Yes please add "send commands when connecting" as an option.
I do need often the same things like switching to another shell or just starting a "tail -f <filename>" to watch some logfiles. A "send commands when connecting" would be helpful here.
Timewatcher
[Edit] Sorry if confusing you, I mixed it up with my trials to write an AHK script, which starts a putty session out of an active sftp connection within tc. Within this putty session then I often need the same things like switching to another shell or just starting a "tail -f <filename>". I am trying to automate putty login and also to send some commands after successful login. I will keep you informed, if my AHK script is running [/Edit]
TWatcher
Last edited by TWatcher on 2008-09-09, 09:17 UTC, edited 1 time in total.
Post Reply