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

johnywhy

If I open a Terminal, then I see the "Connecting" messages. Therefore, it seems terminal is running under a separate session. No? The article you linked seems to confirm that all terminal sessions run on a separate connection, no?
To support execution of remote command and a direct duplication of remote file, WinSCP can open a separate shell session to perform the commands. The shell session is opened automatically.

The article links to a different article, which might be more relevant.
https://winscp.net/eng/docs/ui_login_scp

The linked article is about other shell options (not about running in a separate session). One of these may be the cause of this error:
  • Shell option: what shell WinSCP will use.
  • Return code variable: what environment variable contains exit code of the last command.
  • Listing command: what shell command WinSCP uses to list directory contents.
  • Ignore LS warnings: ignore any error messages printed by the ls command.
  • Clear aliases: clear all aliases on start-up.
  • Clear national variables: clear environment variables known to influence directory listing.
  • Use scp2 with scp1 compat: force the scp command to use really the SCP protocol.

However, I am moving to a new host, due to several issues with 1and1 (including this issue). I'm not seeing this issue on my new host (namecheap). So I no longer need to resolve this issue. I'll leave it to others to experiment.
johnywhy

I found Advanced settings for the connection, but I don't see where to set remote commands to a separate shell session. That's not clear from the link you shared.

How do I set remote commands to a separate shell session?

thx
martin

Re: Terminal Commands Fail with "cd no such file or directory"

Both the Duplicate command (with "Duplicate via local temporary copy" being off) and remote commands do require a separate shell session:
https://winscp.net/eng/docs/shell_session
johnywhy

Terminal Commands Fail with "cd no such file or directory"

I receive the cd "no such file" error in various scenarios, even though I didn't enter cd.

Error occurs when I launch WinSCP, when I do right-click > Duplicate on a file, and when I attempt to execute terminal commands.
Commands work without error in PuTTY.
An unknown bash is being executed.

It seems WinSCP, or the remote host, is executing cd.
It appears the cd is trying to change from root to active directory, which is why the cd fails. The target dir is already the active dir.

Version: 5.13 build 8172
Windows 8.1
SFTP
Host: 1and1 shared
Error changing directory to '/clickandbuilds/MediaWiki/MyWikis/extensions'
Command 'cd "/clickandbuilds/MediaWiki/MyWikis/extensions"'
failed with return code 1 and error message
-bash: line 17: cd: /clickandbuilds/MediaWiki/MyWikis/extensions: No such file or directory.

<invalid hyperlink removed by admin>

Log attached.