Topic "*.out file treated as directory?"

Author Message
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
First I would like to thank you for your hard work on producing a professional open-source product! I have found a minor glitch though...

version 5.1.4 on Windows 7

On our remote Unix servers, our tracing files are called "MTRC.out". I have double-click set to copy in the WinSCP options.

When ever I try to copy the "MTRC.out" file from the remote server using the double-click, WinSCP interprets this file as a directory, attempts to open this "directory" and sometimes returns an error dialog:

No such file or directory.
Error code: 2
Error message from server: None
Request code: 11

This does not occur when using the copy button, so it is a minor irritation, not a show-stopper.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Isn't it a symlink?
Does the double-click to copy for other files?
_________________
Martin Prikryl
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
prikryl wrote:
Isn't it a symlink?
Does the double-click to copy for other files?


No, it is mostly an ASCII text file, although it may contains nulls and other non-printable characters, but since I am copying in binary mode that should not make any difference.

I have just tried renaming the file extension, but it makes no difference, so that is a red herring. Perhaps it is because the directory name is "trace"? I tried moving other files into this directory, and they all suffer the same fate!

Double-click to copy works for files in other directories.
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
I have been trying other files and directories on other servers, and received inconsistent results across the remote servers, although the SunOS one is behaving better the AIX ones!

It makes me curious what criteria is used by the double-click function for telling the difference between a directory and a file on a remote server... apparently not as simple as one might assume Smile
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
There are no rules that can change between directories on the same server.

If resolving symlinks is turned off or not supported by the server/protocol, copy by double-click never works on the server. Also copy by double-click does not work for directories. So the only explanation would be that WinSCP considers the .out file to be a directory. You should be able to tell that by file icon. Can you attach a screenshot of such file and also a session log file?
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
As mentioned, this is only occurring against AIX servers, not SunOS.

You will notice the Notepad++ Windows icons and file sizes.
WinSCP-double-click-copy-bug.doc (492.5 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Thanks. Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. 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.
_________________
Martin Prikryl
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
I started the log already in a directory, tried to right click copy, got an error dialog.
Then change directory via bookmark, repeated with another file, got an error dialog, hoping for more info than the first line of the log, but no. I have anonymised the directory paths.
WinSCP.log (3.15 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I need a log showing listing of the parent directory too. This only shows that WinSCP already believes the file is directory, but does not show why.
_________________
Martin Prikryl
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
Sorry about the delay, I was on vacation.

The log file starts in a saved session failing because of a file being treated as a directory, then navigates to another directory, then fails a file as a directory.

My guess at this point is that it may be down to some unusual Unix configuration - not my area of expertise.
WinSCP.log (9.73 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Sorry, I should have mentioned it before, I need Debug 1 level log. Thanks.
_________________
Martin Prikryl
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
Sorry it took a while to get back to this, been v. busy!

Anonymised Debug level 1 trace attached, the relevant bit starts around line 230.
WinSCP.log (27.55 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Thanks.
I could have noticed in the previous log already: You have opted to use SFTP version 2. Any reason for that? With SFTP-2, symlink resolution is not supported. As a consequence, when double-clicking any file, WinSCP behaves as if it was a symlink to a directory, just in case it is.
Documented here:
https://winscp.net/eng/docs/ui_login_directories#directory_reading_options

If you can, make sure you use newer version of SFTP protocol:
https://winscp.net/eng/docs/ui_login_sftp#protocol_options
_________________
Martin Prikryl
ynohoo
[View user's profile]

Joined: 2013-04-24
Posts: 8
Thanks for your assistance, I will refer the issue to our Unix admins.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License