PutFile requires the directory list permission? (wodSFTP / wodSFTP.NET / wodSFTPdll)

by sramey @, (5983 days ago)

I do not want to have directory list enabled on my sftp server.

PutFile will only work if (Directory list access) is enabled.

Thanks.

locked

Re: PutFile requires the directory list permission

by woddrazen @, (5983 days ago) @ sramey

Hi,


There is no need to use ListDir (Directory list access) if you want to use PutFile for uploading file to server. PutFile is independent Method and you can access it without using ListDir first.

Did you try maybe our samples? You can find it in component Samples folder. Maybe they can help you to start developing with wodSFTP.

Let us know ho wit goes.


Regards,
Drazen

locked

Re: PutFile requires the directory list permission

by sramey @, (5982 days ago) @ woddrazen

Maybe I was misunderstood.

I am not calling ListDir. Just simply calling PutFile will not work with the directory listing permission disabled

but when I turn the Directory listing permission on and use the same code... it works fine.

locked

Re: PutFile requires the directory list permission

by woddrazen @, (5982 days ago) @ sramey

Hi,


Which error did you receive? Somehow I think that you disable file upload also because I don't see why PutFile will not work if directory list access is disabled.

Did you try to upload file to that server when directory list access is disabled using some other SFTP client maybe?


Drazen

locked

Re: PutFile requires the directory list permission

by sramey @, (5982 days ago) @ woddrazen

Yes, WINSCP works fine.

ftp.PutFile(@ c:upx.exe , /upx.exe );

Without Directory listing enabled Server log is:

[31] Sun 21Dec08 12:44:24 - (001429) SSH2_MSG_USERAUTH_SUCCESS: successful login
[30] Sun 21Dec08 12:44:24 - (001429) SSH_FXP_INIT: client version 3
[31] Sun 21Dec08 12:44:24 - (001429) SSH_FXP_VERSION: server version 3
[30] Sun 21Dec08 12:44:24 - (001429) {0x3c3a632c} SSH_FXP_REALPATH
[31] Sun 21Dec08 12:44:24 - (001429) {0x3c3a632c} SSH_FX_NO_SUCH_FILE: No such file.
[30] Sun 21Dec08 12:44:24 - (001429) {0x3c3a632c} SSH_FXP_STAT: path: /upx.exe
[31] Sun 21Dec08 12:44:24 - (001429) {0x3c3a632c} SSH_FX_NO_SUCH_FILE: No such file.

With Directory Listing Enabled is:

[31] Sun 21Dec08 12:46:17 - (001430) SSH2_MSG_USERAUTH_SUCCESS: successful login
[30] Sun 21Dec08 12:46:17 - (001430) SSH_FXP_INIT: client version 3
[31] Sun 21Dec08 12:46:17 - (001430) SSH_FXP_VERSION: server version 3
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc01} SSH_FXP_NAME: path: /
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc02} SSH_FXP_STAT: path: /upx.exe
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc02} SSH_FX_NO_SUCH_FILE: No such file.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc02} SSH_FXP_STAT: path: /
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc02} SSH_FXP_ATTRS
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc03} SSH_FXP_OPEN: path: /upx.exe
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc03} SSH_FXP_HANDLE: file handle: 0x00000330
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[11] Sun 21Dec08 12:46:17 - (001430) Receiving file c: ransmissionsupx.exe
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 32768 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_WRITE: handle: 0x00000330; 7168 bytes
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.
[30] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FXP_CLOSE: handle: 0x00000330
[11] Sun 21Dec08 12:46:17 - (001430) Received file c: ransmissionsupx.exe successfully (1,056.22 KB/sec - 269,312 Bytes)
[31] Sun 21Dec08 12:46:17 - (001430) {0x5514fc04} SSH_FX_OK: Success.

locked

Re: PutFile requires the directory list permission

by woddrazen @, (5982 days ago) @ sramey

Hi,


What happened if you disable (uncheck) Allow SCP fallback in winSCP. Does it work then?


Drazen

locked

Re: PutFile requires the directory list permission

by sramey @, (5982 days ago) @ woddrazen

Yes. Still works fine. Here is the server log of WINSCP with SCP diabled.

[30] Sun 21Dec08 13:44:17 - (001432) {0x00004407} SSH_FXP_LSTAT: path: /upx.exe
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004407} SSH_FX_NO_SUCH_FILE: No such file.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004507} SSH_FXP_LSTAT: path: /upx.exe.filepart
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004507} SSH_FX_NO_SUCH_FILE: No such file.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004603} SSH_FXP_OPEN: path: /upx.exe.filepart
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004603} SSH_FXP_HANDLE: file handle: 0x0000036c
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004806} SSH_FXP_WRITE: handle: 0x0000036c; 4096 bytes
[11] Sun 21Dec08 13:44:17 - (001432) Receiving file c: ransmissionsupx.exe.filepart
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004806} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004906} SSH_FXP_WRITE: handle: 0x0000036c; 4096 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004906} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004a06} SSH_FXP_WRITE: handle: 0x0000036c; 4096 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004a06} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004b06} SSH_FXP_WRITE: handle: 0x0000036c; 4096 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004b06} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004c06} SSH_FXP_WRITE: handle: 0x0000036c; 4096 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004c06} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004d06} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004d06} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004e06} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004e06} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004f06} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004f06} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005006} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005006} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005106} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005106} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005504} SSH_FXP_CLOSE: handle: 0x0000036c
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005206} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005206} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005306} SSH_FXP_WRITE: handle: 0x0000036c; 32739 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005306} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005406} SSH_FXP_WRITE: handle: 0x0000036c; 19659 bytes
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005406} SSH_FX_OK: Success.
[11] Sun 21Dec08 13:44:17 - (001432) Received file c: ransmissionsupx.exe.filepart successfully (1,538.01 KB/sec - 269,312 Bytes)
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005504} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005612} SSH_FXP_RENAME: old: /upx.exe.filepart ; new: /upx.exe
[13] Sun 21Dec08 13:44:17 - (001432) Renamed c: ransmissionsupx.exe.filepart to c: ransmissionsupx.exe
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005612} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00004709} SSH_FXP_SETSTAT: path: /upx.exe
[31] Sun 21Dec08 13:44:17 - (001432) {0x00004709} SSH_FX_OK: Success.
[30] Sun 21Dec08 13:44:17 - (001432) {0x0000570b} SSH_FXP_OPENDIR: path: /
[31] Sun 21Dec08 13:44:17 - (001432) {0x0000570b} SSH_FXP_HANDLE: directory handle: 0x00000003
[30] Sun 21Dec08 13:44:17 - (001432) {0x0000580c} SSH_FXP_READDIR: handle: 0x00000003
[31] Sun 21Dec08 13:44:17 - (001432) {0x0000580c} SSH_FX_EOF: End of file.
[30] Sun 21Dec08 13:44:17 - (001432) {0x00005907} SSH_FXP_LSTAT: path: /..
[31] Sun 21Dec08 13:44:17 - (001432) {0x00005907} SSH_FX_NO_SUCH_FILE: No such file.
[30] Sun 21Dec0...

locked

Re: PutFile requires the directory list permission

by woddrazen @, (5982 days ago) @ sramey

Hi,


Is there any chance we can connect to your server and duplicate your problem?

You can send your private information to: techsupport@weonlydo.com


Drazen

locked