*.out file treated as directory?

Advertisement

ynohoo
Joined:
Posts:
8

*.out file treated as directory?

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.

Reply with quote

Advertisement

ynohoo
Joined:
Posts:
8

Re: *.out file treated as directory?

martin 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.

Reply with quote

ynohoo
Joined:
Posts:
8

more experiments with double-click for copy...

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 :)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: more experiments with double-click for copy...

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Screen dumps attached in doc..

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.

Reply with quote

ynohoo
Joined:
Posts:
8

log file

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.

Reply with quote

martin
Site Admin
martin avatar

Re: log file

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.

Reply with quote

Advertisement

ynohoo
Joined:
Posts:
8

another log file...

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.

Reply with quote

ynohoo
Joined:
Posts:
8

once more into the breach...

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: once more into the breach...

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

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum