1834458 Members
2564 Online
110067 Solutions
New Discussion

group id

 
malay boy
Trusted Contributor

group id

$ id
uid=255(htoo) gid=116(bscs) groups=9998(Users)
$ pwd
/home/htoo
$ id
uid=255(htoo) gid=116(bscs) groups=9998(Users)
$ touch cc.c
$ ls -l cc.c
-rw-r--r-- 1 htoo daemon 0 Jun 10 16:14 cc.c

Please see above.This is very funny.Whenever I do a touch on a file the group change to daemon even I'm not in this group.

regards
mB
There are three person in my team-Me ,myself and I.
16 REPLIES 16
Robert-Jan Goossens
Honored Contributor

Re: group id

Hi mB,

what does "# id daemon" report, or "# grep daemon /etc/group"

Robert-Jan
malay boy
Trusted Contributor

Re: group id

Thanks Jan.

$ id daemon
uid=1(daemon) gid=1(daemon)
$ grep daemon /etc/group
daemon:*:1:daemon
$ ypcat group|grep daemon

By the way we are using NIS.

regards
mB
There are three person in my team-Me ,myself and I.
Fred Ruffet
Honored Contributor

Re: group id

please submit ouput of
ls -ld /home/htoo
(looking for acls)
and of
grep -e "bscs" -e "daemon" /etc/group
(looking for strangeness :)

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Jeroen Peereboom
Honored Contributor

Re: group id

Maybe setgid on the directory?
Try the same in another directory to see if the same problem occurs.

(and remove the file before touching again)

JP.
malay boy
Trusted Contributor

Re: group id

Fred ,
You are getting somewhere.here are the output of the :

# ls -ld /home/htoo
lrwxrwxrwx 1 root system 18 Jun 10 16:40 htoo -> /tmp_mnt/home/htoo

# ls -ld /tmp_mnt/home/htoo
drwxrwxrwx 11 root daemon 1536 Jun 10 16:43 /tmp_mnt/home/htoo

FYI we are using auto mount .

I try ti change the owner on /tmp_mnt/home/htoo it give below error :

# chown htoo:bscs htoo
chown: htoo: Not owner


regards
mB
There are three person in my team-Me ,myself and I.
Jeroen Peereboom
Honored Contributor

Re: group id

Oops, forget the setgid remark in my previous reply. (Should be sticky bit, but it is not relevant for groups).

JP
Fred Ruffet
Honored Contributor

Re: group id

You must be root to chown from root to htoo.

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Fred Ruffet
Honored Contributor

Re: group id

could you try to touch directly in /tmp_mnt/home/htoo with user htoo. Maybe the linking is messing it up.

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
malay boy
Trusted Contributor

Re: group id

Fred,
I am using root.But it give me not owner error .... any idea ?.

regards
mB
There are three person in my team-Me ,myself and I.
Robert-Jan Goossens
Honored Contributor

Re: group id

automounted nfs dir ? try to change the permissions on the server.
malay boy
Trusted Contributor

Re: group id

Robert,
I did change the source nfs server directory.But the result still the same...

regards
mB
There are three person in my team-Me ,myself and I.
Fred Ruffet
Honored Contributor

Re: group id

Hmmm... I didn't understand that where automount of NFS. What is the ID of htoo on distant server ? What is the ID of daemon on distant server ? What is the content of the /etc/exports file for the line concerning your directory ?

All of this might help, as long as permissions are set on the other server and replicated as UIDs on local. options of export may also have influence.

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Robert-Jan Goossens
Honored Contributor

Re: group id

could you check the permissions off,

# ll /usr/bin/chown
-r-xr-xr-x 1 bin bin 24576 Nov 7 1997 /usr/bin/chown
Jeroen Peereboom
Honored Contributor

Re: group id

As a sidestep you can give ls an option (-n ?) to have numerical IDs in the output. Names are just a translation from numbers, so let's first make sure the numbers are right and check the translation of the number to names later (passwd, nis, ...)

JP
Armin Kunaschik
Esteemed Contributor

Re: group id

Some things to try:
- I learned not to trust the id command output,
especially in NIS environments with HP-UX servers.
- Find out manually, what groupset you are in:
ypcat passwd|grep htoo
ypcat group|grep htoo

- Check for local accounts in /etc/passwd and /etc/group overriding the NIS settings!

- Check the directory for sedgid flags and remove (if appropriate):
chmod g-s

Regards,
Armin
And now for something completely different...
Elmar P. Kolkman
Honored Contributor

Re: group id

I think the problem is not necessarily on the machine you located the problem, but on the server where /tmp_mnt/home/htoo is mounted from.

Checkout: bdf /tmp/home/htoo

Also checkout any mount options.
And of course export options. Could it be you have some mapping for group id's?
Checkout output of showmount -e .

Every problem has at least one solution. Only some solutions are harder to find.