Error getting name of current remote directory

Advertisement

Kaktusfan1707
Joined:
Posts:
5

Error getting name of current remote directory

Hello,
i´m trying to connect to another device over SCP and C#. I try it 5 times and at some time it works on first and on other time it works on 4. try. If it´s not connecting the exception will be written in a logfile.
Here the LogEntry:
Error getting name of current remote directory. ---> WinSCP.SessionRemoteException: Command "pwd"
failed with return code 0 and error message
-sh: groups: not found.

Why happens this sometimes and sometimes not?

Thank you for help

Reply with quote

Advertisement

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

Re: Error getting name of current remote directory

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. 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

Advertisement

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

OK, I didn't notice that the log includes multiple sessions (some failing some not) and that the error is in German.
Your server delays printing of error message for group command, what makes WinSCP confuse the error with output of following pwd command.
So you need to turn off Lookup user groups.
https://winscp.net/eng/docs/ui_login_scp#other_options
To turn it off from .NET assembly, see:
https://winscp.net/eng/docs/rawsettings

Reply with quote

Advertisement

You can post new topics in this forum