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
Zenman
Junior Member
Junior Member
Posts: 31
Joined: 2005-11-21, 07:39 UTC

Post by *Zenman »

Is it possible to set the default logging directory to user directory? (currently, the default is the system root)
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

You can change it in the connection string: Just set the user directory in this way:
server.com:port/user/directory.

mf
Bankster - Word of the Year 2009
Zenman
Junior Member
Junior Member
Posts: 31
Joined: 2005-11-21, 07:39 UTC

Post by *Zenman »

thanks :lol:
Just tried to edit some files on my server (emeditor). When I saved the file, TC prompted me "click on close when the temporary file can be deleted'. I had to click close. Then another window popuped "the file XXX has changed, do you want to upload it to ....'. I had to press "yes' again.
my quesiton:
Is it possible to dismiss these 2 dialogs (deleting temporary files and uploading it to server AUTOMATICALLY without prompts) :?:
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3862
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Is it possible to dismiss these 2 dialogs (deleting temporary files and uploading it to server AUTOMATICALLY without prompts)
This makes no sense. They are mandatory!

If you edit a remote file, it is stored in a temporary file. Saving it will modify the temporary file.
Due to the fact, that some editors don't lock the temporary file, TC never knows if a file is still in use or modifications are finished.
Hence, TC asks YOU to press on Close if your modifications are done and TC can delete the temporary file with all your modifications.
Doing this automatically, would delete the temporary file just within the second you created it (no chance to modify, even for quick fingers)

If you close the editor (which has been opend by TC) and a file date change is detected, you are asked if the modified, temporary file should be uploaded.
YOU have to decide.
Doing this automatically would force an upload of every modification (even mess) just by doing an intermediate save or closing the editor and you cannot inhibit it.
#5767 Personal license
andres992
Member
Member
Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 »

Does this plugin allow to edit permissions for existing files/folders on the server? If not, then it could be a useful additional option.
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

andres992 wrote:Does this plugin allow to edit permissions for existing files/folders on the server? If not, then it could be a useful additional option.
Yes, you can change permissions just like you do with ftp files. If not enough, i.e. if you want to change the owner, you can use the commandline to enter chown/chmod etc...

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

Post by *andres992 »

CoolWater wrote:Yes, you can change permissions just like you do with ftp files.
Thanks, I did not even know that before. Maybe the functionality should also appear in the right-click menu?
TWatcher
Junior Member
Junior Member
Posts: 43
Joined: 2008-08-26, 18:46 UTC

Post by *TWatcher »

Hello Christian,
there seems to be bug in the plugin for the password storage/retrieval function. The function fails if "rare" characters are part of the password, in my case it was the character §, but also the usage of German Umlaute will fail.
(For strong passwords it is recommended to include special characters :wink:)
May be you have just to replace ("%s%03d") with ("%s%03u") ? I hope this helps.
TWatcher
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:
Is it possible to copy files directly from one sftp-connection (e.g. left panel) to another sftp-connection (e.g right panel)?
No, sorry - the plugin would have to download the file and then re-upload it, which would be very inefficient and slow. Beta 0.6 now supports to copy files within a server, though, by sending the "cp" command directly as a shell command.
Christian, please - implement it (for a regular FTP too). If I need to copy a file from the one server to the another I have just two options:
1. Go to the cmd-line via telnet/ssh and do FTP/SFTP to the another server manually
2. Or - I am lazy (do not know to use cmd line) and then I'll do it via TC: Download file via TC to a temp dir on the local PC and upload it the another server

I know you support for the regular FTP server side transfer - unfortunately none of the servers I am accessing supports it.

Once you'll support copy server-server via local PC, there will be no problem to support what pdavit asked for: from FTP to SFTP connection and vice versa.

Do not worry about an inefficiency/slowness. That argument was ok, when a most people was using a slow phone modem connection. In fact, once TC detects that situation, it can still ask user if he want to copy the files via local PC or no (please make option to turn that question off in .ini file). If I want to copy 10 small files, it will be definitely much faster using TC via local drive than any another way

thank you

ado
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

The plugin is working better and better :)

One thing I would like to call a feature request. Usually if I need to go a few folders deep, I just type the full path and have TC jump there. Now this works fine as long as I don't make a typo and the folder exists.

If the folder does not exists, TC shows me the local folder I was at before starting SFTP. ALT-left arrow will take me back to the SFTP server folder but it would be nice if it just didn't change if the folder doesn't exist. The message in the status bar on top of "Directory not opened: Failed opening remote file" is enough for me.

The crash bug I reported before I can still reproduce it with the latest beta. This time the CPU stays normal but TC is inaccessible.
Registered user #92105
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Beta 0.8 is out now! See the first message for the download links.

The changes are:
- Show server list as links instead of folders! Advantage: Allows to start in a subdir of the server
- Could not store passwords with accents or special chars like §
- Could not open directories with UTF-8 names
- Set permissions of uploaded file to user-defined permissions ONLY when not overwriting an already existing file
- 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
- Resume upload only seems to work when clearing the "stat" command parameter before getting the file attributes
- Downloads could hang when network connection was cut just during the download

==================================
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).
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.

About the home dir problem: I found a solution now! Instead of showing connections as folders, I show them as symbolic links! A link in a plugin allows to redirect to any subdir. So if the user has set /home/myname as the home dir, double clicking on
/Secure FTP/servername
will now redirect the user directly to
/Secure FTP/servername/home/myname !

I hope that you like this solution too. The plugin will also remember the last active directory now, so when you double click on /Secure FTP/servername when the connection is still active, you will be sent to the last active directory.
Changing into a directory with a name containing UTF8 characters still gives "Failed opening remote file".
Thanks for the warning! Indeed the plugin didn't support UTF-8 names in directories yet. Please test now with beta 0.8.
there seems to be bug in the plugin for the password storage/retrieval function. The function fails if "rare" characters are part of the password, in my case it was the character §, but also the usage of German Umlaute will fail.
I didn't write that code, but I think that I could fix it now. I really can't recommend to store passwords in the plugin, it's insecure by design. There is NO safe way to store passwords on a PC, except for using a master password - but then you have to enter a password again each time...
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.
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Thanks Christian :)

maybe it was already mentioned here.. but when disconnecting an active connection (via the disconnect button), the lock remains green..

Regards,
CoolWater
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

It can not reproduced here. :( Didn't know what's wrong.
Are you still in the panel of the connected server when you disconnect it?

mf
Bankster - Word of the Year 2009
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:About the home dir problem: I found a solution now! Instead of showing connections as folders, I show them as symbolic links! A link in a plugin allows to redirect to any subdir. So if the user has set /home/myname as the home dir, double clicking on
/Secure FTP/servername
will now redirect the user directly to
/Secure FTP/servername/home/myname !

I hope that you like this solution too. The plugin will also remember the last active directory now, so when you double click on /Secure FTP/servername when the connection is still active, you will be sent to the last active directory.
Don't know what I should say, but, it works perfect now! :D
Thank you very much Christian!

mf
Bankster - Word of the Year 2009
CoolWater
Power Member
Power Member
Posts: 737
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Mikefield wrote:Are you still in the panel of the connected server when you disconnect it?
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... :oops:

Regards,
CoolWater
Post Reply