New SFTP plugin available now
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
My plugin passes the mode to the libssh2_sftp_mkdir function. However, some servers may not support the mode parameter of the create directory function...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
The plugin creates directories in that server but it creates them as "755" and not "777" even if "777" is set in preferences. Is there a way to determine whether the server actually supports this or not?ghisler(Author) wrote:My plugin passes the mode to the libssh2_sftp_mkdir function. However, some servers may not support the mode parameter of the create directory function...
Earlier I used the old SFTP plugin "SFTP Connections" which set both file and directory rights correctly (after I had modified a line in the wfx) in the same server. But your plugin is better since it supports UTF-8.
#68776 Personal Licence
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, no idea - it may also be a bug in the used sftp dll. Which version of the dll do you use?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Another little patch:
http://web.hisoftware.cz/sob/download/sftpplug_src08beta-fix.patch
This one fixes address/port parsing. The original code just looked for ":" as the port delimiter. It was good only as long as no one tried to enter numeric IPv6 address and that's exactly what I did yesterday.
If anyone feels my code doesn't look exactly nice, then you're most probably correct - C pointers and I just don't get along. ;)
http://web.hisoftware.cz/sob/download/sftpplug_src08beta-fix.patch
This one fixes address/port parsing. The original code just looked for ":" as the port delimiter. It was good only as long as no one tried to enter numeric IPv6 address and that's exactly what I did yesterday.
If anyone feels my code doesn't look exactly nice, then you're most probably correct - C pointers and I just don't get along. ;)
libssh2.dll is version 0.18 (170,496 B; binary by Günter Knauf from libcurl 7.19.0; it seems that 0.18 is the latest for Win32 anyway)ghisler(Author) wrote:Sorry, no idea - it may also be a bug in the used sftp dll. Which version of the dll do you use?
libeay32.dll is dated 08 June 2008 (1,536,143 B)
libssl32.dll is dated 08 June 2008 (328,817 B)
(both also from the libcurl 7.19.0 package)
STFPPlug is 0.8 beta
I could not find any other sftp server to test with but I can try to get you a test account (for SFTP) on the server I am using.
#68776 Personal Licence
You can use the mini-sftp-server for additional tests. Link below
http://www.coreftp.com/server/download/msftpsrvr.exe
mf
http://www.coreftp.com/server/download/msftpsrvr.exe
mf
Bankster - Word of the Year 2009
The CoreFTP mini-server otherwise works well with SFTPPlug but here the server does not let the user put chmod 777 for directories (dirs are set as 666).
In TotalCommander with SFTPPlug I can make a directory (which is always set to 755 by the plugin) and then use the Change Attributes dialog from the file menu to set the dir rights to 777. (So yes, there is a workaround but it is not the most comfortable one.)
When I access CoreFTP mini-server through SFTPPlug, I cannot even change dir rights to 777 via the Change Attributes dialog (the dir rights stay 666).
In TotalCommander with SFTPPlug I can make a directory (which is always set to 755 by the plugin) and then use the Change Attributes dialog from the file menu to set the dir rights to 777. (So yes, there is a workaround but it is not the most comfortable one.)
When I access CoreFTP mini-server through SFTPPlug, I cannot even change dir rights to 777 via the Change Attributes dialog (the dir rights stay 666).
#68776 Personal Licence
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2Sob
Thanks, I will apply your patch to the next beta!
2andres992
What I could do is create the directory, and then set the rights with a second call to CHMOD (as if you changed it manually). This is a workaround to a server bug, but better than nothing. On my Cpanel servers ghisler.com and ghisler.ch it works directly...).
Thanks, I will apply your patch to the next beta!
2andres992
What I could do is create the directory, and then set the rights with a second call to CHMOD (as if you changed it manually). This is a workaround to a server bug, but better than nothing. On my Cpanel servers ghisler.com and ghisler.ch it works directly...).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Thanks! Such workaround would probably make the plugin foolproof as to any tricky servers like the one I am using.ghisler(Author) wrote:What I could do is create the directory, and then set the rights with a second call to CHMOD (as if you changed it manually). This is a workaround to a server bug, but better than nothing.
#68776 Personal Licence
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, please contact me by e-mail to support at ghisler dot com for a test version, it would be great if you could test it before I release a new public beta.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 7
- Joined: 2008-11-19, 10:42 UTC
Would it be able to support a hybrid mode?ghisler(Author) wrote:Unfortunately it's not that easy. Uploading and downloading would be quite easy to add, I would just call libssh2_scp_send_ex and libssh2_scp_recv. However, there is no function for reading the directory listing. I would probably need to open a shell session, and then send the ls -a command and parse it manually...
- read directory listing through SFTP
- transfer files through SCP
The reason for this question is, that I recognized big speed differenced between both. Not on all of my servers, but on many!
I could transfer files with the (old) SFTP-Plugin at about 1 MByte/s, with 'pscp -sftp' at 0.5 MByte/s and with 'pscp -scp' at 8-9 MByte/s...
So I would be glad to see TC transfer files via SCP instead of SFTP, although this leaves the need for the server to support SFTP as well.
Sven.
...and the transfer rate with "pscp"? (without any forced protocol [1])Sven Giermann wrote:I could transfer files with the (old) SFTP-Plugin at about 1 MByte/s, with 'pscp -sftp' at 0.5 MByte/s and with 'pscp -scp' at 8-9 MByte/s...
...and the transfer rate of batch mode of "psftp"?
JOUBE
[1] PuTTY User Manual: Normally PSCP will attempt to use the SFTP protocol, and only fall back to the SCP protocol if SFTP is not available on the server.
-
- Junior Member
- Posts: 7
- Joined: 2008-11-19, 10:42 UTC