SUMMARY: Group disappearing

From: G. Dimitoglou (george@esa.nascom.nasa.gov)
Date: Fri Jun 05 1998 - 08:37:39 CDT


As always, prompt and correct responses flooded my mailbox.

The problem:
 
> I am seeing this crazy thing when I 'ls' on a specific user,
> (oracle) I see no group listing:
> -rw-r--r-- 1 oracle 737 Mar 26 14:49 t_obs_mode.sql
> -rw-r--r-- 1 oracle 777 Mar 26 14:49 t_obs_name.sql
> with other users, it is fine:
> -rw-rw-r-- 1 sohoar sohoar 721 Dec 9 12:08 test
> -rw-rw-r-- 1 sohoar sohoar 809 Dec 9 12:08 test.txt

The answer is that the Oracle PATH picks up a different `ls' (/usr/ucb/ls instead of /bin/ls).

Thanks everybody for the response.

Following, pls find the reponses and the names of the 7 who answered the
question first. I lost track after that...:)

====================================
George Dimitoglou (SAC)

SOHO ESA/NASA Project Scientist Team
NASA Goddard Space Flight Center
Bldg. 26, G-1, Code 682.3
Greenbelt, MD 20771
george@esa.nascom.nasa.gov
====================================

From: Ann Benninger <ahb@exelixis.com>
From: Jamie Lawrence <jal@ThirdAge.com>
From: Scott Howard <showard@macquarie.com.au>
From: "K.Ravi" <RAVKRISH.IN.ORACLE.COM.ofcmail@in.oracle.com>
From: "Steve Kay" <stevekay@hotmail.com>
From: Matthew Atkinson <m.atkinson@csl.gov.uk>

From: Ann Benninger <ahb@exelixis.com>

One looks like the output from '/usr/ucb/ls -l', the other looks like
the output from '/usr/bin/ls -l'. Are you running ls as the user, so
with different program search paths?

 - Ann

From: Jamie Lawrence <jal@ThirdAge.com>

Compare the $PATHs.

There are several instances of "ls" in the file system.
I think some of them have default behaviour that in others
is only invoked via the '-g' flag.

-j

From: "Trubkina I." <asa@mmk.ru>

Just it may be different aliases for `ls`.
Saw it :
# alias ls
It may be :
ls ls -g

From: Igor Schein <igor@txc.com>

Do \ls -n or \ls -bl. I assume you're on Solaris and don't need -g

From: Tom_Cowan@pcworld.com

Perhaps something to do with aliasing? Are you sure your ls is using the g
option?

Tom

From: Robert Owen Thomas <robt@cymru.com>

First, ascertain which ls command you are using with "type ls". Make
sure you are not using BSD ls for the oracle-owned files and SVR4 ls
for the sohoar-owned files. Next, it is possible that there are some
special characters in the oracle group's name. Try "ls -bl" to print
any goofy characters.

Hope this helps!

--Rob

From: Rik Schneider <rik@netasset.com>
Do you have groups defined (in /etc/group) for gid 737 and 777.

From: Greg Sawicki <sawicki@interlog.com>

First thing comes to my mind that this files could have been created when
filesystem was accessed from another system via NFS. On that other system
UID oracle may have primary group GID=737 and such GID does not exist on
system executing 'ls'. How the heck you got 737 and 737? it could have been
same mechanism involving two systems on the network instead of one. Given
the timestamps (same time) it's less likely. Just some thoughts I may be
wrong.

From: "V. Q. Hoang" <vqh@dw.lucent.com>

It depends on which version (bsd/SysV) of ls you're running,
check the user's PATH

Viet Hoang
vhoang@lucent.com

From: "David Evans" <DJEVANS@au.oracle.com>
This is very simple. All user ids and groups are stored as numbers.
You see a name ONLY if there is an entry in /etc/passwd (for users)
or /etc/group (for group names). If there is no entry then the number
is displayed. You can force the numeric value to be displayed but this
is not often needed.
 
So the groups 737 and 777 may have had an entry in /etc/group or
the partition was mounted on another machine and the files created
on the remote machine and the remote machine has the groups which
equate to 737 and 777.
 

From: seeger@cise.ufl.edu (Charles Seeger)
Does the oracle user alias the ls command to 'ls -g' in the start
up script for whichever shell it is using?

>From mikem@centerline.com Thu Jun 4 18:19 EDT 1998

A file's group is stored by group number; when you 'ls' the file, the
'ls' command translates the number into a group name.

The mechanism of looking up the group name depends on what OS you're
running.

If it's a SunOS 4.x machine, it checks the local /etc/group file for
a group name that matches the file's group number, e.g. 737 or 777;
if the machine's running NIS and the group number wasn't in the local
file, then the NIS group database is consulted.

If it's a Solaris 2.x machine, it depends on the /etc/nsswitch file,
but usually some combination of the local /etc/group file followed by
the NIS or NIS+ database would be checked for the group number.

In your case, whatever the reason, the machine doesn't know the name
of the group that corresponds to the numbers 737 or 777, so 'ls' only
displays the group number, not the group name.

See if the groups 737 or 777 are defined elsewhere on your network.
Then check the group 'sohoar'. If 'sohoar' is defined locally, but
737 and 777 are defined in the NIS database, then you may have an NIS
problem. Maybe the local machine is bound to an NIS server that has
not been updated by the NIS master.

From: Eugene Kramer <eugene@uniteq.com>

try:
alias ls

From: Scott Howard <showard@macquarie.com.au>

It depends on which ls you use (and thus depends on how your path was setup) :

isd70{showard}121: /usr/bin/ls -l
total 52
-rwxrwxr-x 1 showard isd 26112 Mar 3 17:28 scott.doc
isd70{showard}122: /usr/ucb/ls -l
total 26
-rwxrwxr-x 1 showard 26112 Mar 3 17:28 scott.doc
isd70{showard}123:

From: tim@hermes.dciem.dnd.ca

Could you be getting a different version of "ls"? The SysV version of "ls"
has different meaning for the "-g" flag than the BSD version. The SysV
"ls" interprets the "-g" flag as "hide the group information" resulting
in "ls -l" showing the group. In BSD, "-g" means "show the group info"!

See if "ls -lg" causes the group info to show up in the case where it
wasn't present.

From: "K.Ravi" <RAVKRISH.IN.ORACLE.COM.ofcmail@in.oracle.com>
Check to see if the user has '/usr/ucb' in PATH before /usr/bin. 'ls' in
/usr/ucb gives you the old SunOS behaviour where you have to use 'ls -lg' to=
 
see group names.
 
From: "Steve Kay" <stevekay@hotmail.com>
Depends on the version of 'ls' you're using.
/usr/ucb/ls -l won't show groups
/usr/bin/ls -l will.

From: Matthew Atkinson <m.atkinson@csl.gov.uk>

Sounds like the user has /usr/ucb/bin in their PATH before /bin,
becaue what you're seeing is the typical output from the old SunOS
style ls. Try running /bin/ls and you should get the normal output.

From: Jon M Hayden <jhayden@auspex.com>

What kind of system are you running? SunOS 4.1.X or 5.5?
ls on a 4.1 system doesn't show groups unless you use the -g option. Is ls
aliases to use different options? try doing the ls with a \ in front of it.
This turns off aliasing (Ex. \ls -alg)

From: Richard J Niziak <rickn@ziplink.net>
Try "which ls" you maybe using a different ls command depending on
path... just use a "ls -alg" and that should work..

From: Ralph Dell <RALPH@mail.co.catawba.nc.us>

try ls with the -n option. that will show you the UID and GID numbers
rather than the name. Check that with your group file. Is your group file
ok? Has it changed recently? Is the missing group on the last line of the
file? If you know the group for the file and do chgrp on it does the group
show up?

 



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:41 CDT