Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Invalid handle error with initial remote directory

Still, it would be nice if you report this to Vandyke. If you do, please cc me.
AnonBugCoward

Re: Invalid handle error with initial remote directory

Changing WinSCP to SFTP version 3 and removing the colon (:) from after "Mailbox" did the trick.

When I log onto that site with SFTP version 5 and browse from root, there's a colon after "Mailbox". When I log onto the site with version 3, there's no colon. Very strange!

So solution is:
WinSCP: set SFTP version 3
Remote directory: /Mailbox/FOOORPTS/INBOX

Thanks for the pointers.
martin

Re: Invalid handle error with initial remote directory

AnonBugCoward wrote:

First, I found this post on the forum: https://winscp.net/forum/viewtopic.php?t=2576

Is that related to my issue?

It could be related. Have you tried setting the SFTP version to 3? Also try to seek help from Vandyke support.
AnonBugCoward

Re: Invalid handle error with initial remote directory

First, I found this post on the forum: https://winscp.net/forum/viewtopic.php?t=2576

Is that related to my issue?

Here is the log up until the error plus the next few lines:

--------------------------------------------------------------------------
WinSCP Version 4.3.2 (Build 1201) (OS 5.1.2600 Service Pack 3)
Login time: Thursday, April 21, 2011 1:56:48 PM
--------------------------------------------------------------------------
Session name: FOO
Host name: ftp.foopro.com (Port: 22)
User name: FOOUSER1 (Password: No, Key file: No)
Tunnel: No
Transfer Protocol: SFTP (SCP)
Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
Proxy: none
SSH protocol version: 2; Compression: No
Bypass authentication: No
Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
SSH Bugs: -,-,-,-,-,-,-,-,-
SFTP Bugs: -,-
Return code variable: Autodetect; Lookup user groups: Yes
Shell: default
EOL: 0, UTF: 2
Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
Local directory: C:\Program Files\_Projects\1160\FOO\Daily Foo Files, Remote directory: /Mailbox:/FOOORPTS/INBOX, Update: No, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
DST mode: 1
--------------------------------------------------------------------------
Looking up host "ftp.foopro.com"
Connecting to aaa.bb.ccc.ddd port 22
Server version: SSH-2.0-VShell_2_3_2_178 VShell
We believe remote version has SSH-2 ignore bug
Using SSH protocol version 2
We claim version: SSH-2.0-WinSCP_release_4.3.2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-dss 1024 aa:bb:cc:dd:ee:ff:gg:hh:ii:jj:kk:ll:mm:nn:oo:pp
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "FOOUSER1".
Prompt (6, SSH password, , &Password: )
Sent password
Access granted
Opened channel for session
Started a shell/command
--------------------------------------------------------------------------
Using SFTP protocol.
Doing startup conversation with host.
Type: SSH_FXP_INIT, Size: 5, Number: -1
Type: SSH_FXP_VERSION, Size: 340, Number: -1
SFTP version 4 negotiated.
Unknown server extension newline@vandyke.com=0x00F00
Server requests EOL sequence "\r\n".
File system roots:
Unknown server extension default-fs-attribs@vandyke.com=0x0F00
We will use UTF-8 strings when appropriate
Changing directory to "/Mailbox:/FOOORPTS/INBOX".
Getting real path for '/Mailbox:/FOOORPTS/INBOX'
Type: SSH_FXP_REALPATH, Size: 33, Number: 16
Type: SSH_FXP_NAME, Size: 41, Number: 16
Real path is 'Mailbox:/FOOORPTS/INBOX'
Trying to open directory "Mailbox:/FOOORPTS/INBOX".
Type: SSH_FXP_LSTAT, Size: 36, Number: 263
Type: SSH_FXP_STATUS, Size: 42, Number: 263
Status code: 9, Message: 263, Server: The handle is invalid. , Language: en
(ECommand) Error changing directory to '/Mailbox:/FOOORPTS/INBOX'.
Invalid handle.
Error code: 9
Error message from server (en): The handle is invalid.
Request code: 7
Getting current directory name.
Getting real path for '.'
Type: SSH_FXP_REALPATH, Size: 10, Number: 528
Type: SSH_FXP_NAME, Size: 27, Number: 528
Real path is 'Mailbox:'
Listing directory "Mailbox:".
martin

Re: Invalid handle error with initial remote directory

Please post a full log files showing both cases (separate log file for each).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
AnonBugCoward

Invalid handle error with initial remote directory

I get an invalid handle error when initial SFTP remote directory is /Mailbox:/FOOORPTS/INBOX

I can navigate to the directory manually after login just fine.

WinSCP version 4.3.2 (Build 1201). I got the error in prior versions as well.



---------------------------
Error
---------------------------
Error changing directory to '/Mailbox:/FOOORPTS/INBOX'.
---------------------------
Invalid handle.
Error code: 9
Error message from server (en): The handle is invalid.
Request code: 7
---------------------------
OK Help
---------------------------