Topic "Command "groups" failed (groups: No such file or directory)"

Author Message
jeyk

Guest


hello
I have a problem. When i want too connect with my server i see :
Command "groups"
failed with return code 2 and error message
groups: No such file or directory.
I dont know what it means.
Does anybody know how too solve this problem. I have serwer on linux freesco and package sshd with sftp-server.
Thank you.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
On startup WinSCP tries to get list of groups to which user belongs by executing 'groups' command. This command is probably not supported by your server or the binary is not in path.

You may disable this feature by unchecking 'Lookup user groups' checkbox on Shell tab of login dialog.

For list of commands required by WinSCP see Shell requirements.
_________________
Martin Prikryl
Jeyk

Guest


Thank you.
When i open my log file i see something like this:
. Doing startup conversation with host (shell).
. Skipping host startup message (if any).
> echo "WinSCP: this is end-of-file:0"
< WinSCP: this is end-of-file:0
. Detecting variable containing return code of last command.
. Trying "$status".
> echo "$status" ; echo "WinSCP: this is end-of-file:0"
< WinSCP: this is end-of-file:0
. Trying "$?".
> echo "$?" ; echo "WinSCP: this is end-of-file:0"
< 0
< WinSCP: this is end-of-file:0
. Return code variable "$?" selected.
. Changing directory to "/mnt/home/djariusz".
> cd "/mnt/home/djariusz" ; echo "WinSCP: this is end-of-file:$?"
< WinSCP: this is end-of-file:0
. Getting current directory name.
> pwd ; echo "WinSCP: this is end-of-file:$?"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Jeyk wrote:
When i open my log file i see something like this:
...

OK, it looks fine. Does it mean that it works now?
_________________
Martin Prikryl
redeye

Guest


Hi folks,

thanks for the tip on disabling the "Lookup user group" checkbox...that solves the first problem i was having.

the second problem i am having is that once i am logged in, i try to upload a file, and the server hangs and doesn't copy the file over. a window pops up sometimes to say that the server will abort in 15 seconds if i don't retry.

any ideas what may be causing the server to hang? OpenSSH is enabled, i have a linux box, and running Ensim Web Appliance to manage the hosting accounts.

Mahalo in advance,
redeye
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
  • Make sure that you're using BASH.
  • Make sure that scp binary is available on your server.

_________________
Martin Prikryl
Alex Nevidomsky

Guest


prikryl wrote:
On startup WinSCP tries to get list of groups to which user belongs by executing 'groups' command. This command is probably not supported by your server or the binary is not in path.

You may disable this feature by unchecking 'Lookup user groups' checkbox on Shell tab of login dialog.

For list of commands required by WinSCP see Shell requirements.


In my case it failed again immediately on "ls". The problem has been resolved by defining shell explicitly as "/bin/bash --login" ,which seems to force correct PATH environment.
Vit Hauptman

Guest


hello
I have the same problem, but I don't want to disable 'Lookup user groups' checkbox
I use SCPONLY with CHROOT (with chroot=/home/scpdemo/ ) and I have had copy file /usr/bin/groups to /home/scpdemo/usr/bin/groups, I have had also make /home/scpdemo/etc/group with one line scp::103: .
Can you help me to resolv the problem?

The winscp says: Command "groups" failed with invalid output "".
in log is: Looking up current user groups.
groups ; echo "WinSCP: this is end-of-file:$status"
WinSCP: this is end-of-file:-1

and in syslog is: Mar 18 09:32:41 servername [7427]: failed: /usr/bin/groups with error No such file or
directory(2) (username: scpdemo(2773), IP/port: x.x.x.x 1904 22)

Thank You
prikryl wrote:
On startup WinSCP tries to get list of groups to which user belongs by executing 'groups' command. This command is probably not supported by your server or the binary is not in path.

You may disable this feature by unchecking 'Lookup user groups' checkbox on Shell tab of login dialog.

For list of commands required by WinSCP see Shell requirements.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Do you have /home/scpdemo/usr/bin/ in path? And if you do, is it before /usr/bin/?
_________________
Martin Prikryl
Vit Hauptman

Guest


prikryl wrote:
Do you have /home/scpdemo/usr/bin/ in path? And if you do, is it before /usr/bin/?


I'm sorry, I don't understand, where in path?

(Muzeme mluvit i cesky)
hauptman@volny.cz
Guest




I appreciate the information in these posts; however, I am at a loss on how to 'uncheck "Lookup user groups" on Shell tab of Login dialog' using Version 4.5.2 (Build 624). The Shell tab link points to https://winscp.net/eng/docs/screenshots in which I do not see a Shell tab nor any reference to a "Lookup user groups" checkbox. When I check all of the preferences for WinSCP I still do not see a "Lookup user groups" checkbox in any of the preferences, nor do I see a way to disable this option in a script or on the command line.

I am using the /script option with WinSCP and it is not getting the files I am requesting. I am running WinSCP Version 4.5.2 (Build 624) on a Windows 2008 server.

FYI: The same script and WinSCP version ran successfully on Windows 2003 server.

Any help would be greatly appreciated.

Thank you!
ZekeTheGeek
[View user's profile]

Joined: 2010-03-15
Posts: 2
I found the "Look up user groups" checkbox (you need to select "Advanced options"); however, the checkboxes in the "Other options" grouping are disabled.

Shell: Default
Return code variable: Autodetect

All other selections in "Directory listing" and "Other options" are disabled. How do I enable these other options?

Thanks!
ZekeTheGeek
[View user's profile]

Joined: 2010-03-15
Posts: 2
I figured out how to enable the options, now my problem is getting WinSCP to pull the file I need. Since the "Look up user groups" checkbox is in the session, Do I need to use something other than a script?

Here is my script (sanitized):

option batch on
option confirm off
open scp://[USER]:{PWD]@[HOST]:[PORT]
cd [FOLDER]
option transfer automatic
get *.xml D:\FOLDER\FOLDER\FOLDER\FOLDER\FOLDER\
exit

I also tried

"D:\WinSCP\winscp.exe" /command "open" "[USER]:{PWD]@[HOST]:[PORT]" "get *.xml ""D:\FOLDER\FOLDER\FOLDER\FOLDER\FOLDER\"""

but this did not work.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
ZekeTheGeek wrote:
I figured out how to enable the options, now my problem is getting WinSCP to pull the file I need. Since the "Look up user groups" checkbox is in the session, Do I need to use something other than a script?

Note sure what you mean, though maybe this FAQ gives you an answer. If that does not help, come back.
_________________
Martin Prikryl
RedKing

Guest


I've found the best way to avoid looking up groups with a new connection is to set the default setting in WinSCPs registry entry.
This is particularly useful when using the command line version and specifying the /script switch.

Open regedit and navigate to;
HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions\Default%20Settings

Create a new DWORD value entry called;
LookupUserGroups

Set the value of the LookupUserGroups entry to either 1 or 0;
1 => Will perform groups look up
0 => Will NOT perform groups look up

Hopefully this will help others with this issue

Rory
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks for sharing this. You can do this from the GUI too, by using //Set defaults// command on Login dialog:
https://winscp.net/eng/docs/ui_login#using
_________________
Martin Prikryl
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