problems with ps(1)
amit.chatterjee
amitc at cbnewsl.ATT.COM
Sat Nov 11 07:15:56 AEST 1989
In article <269 at zeek.UUCP>, rick at zeek.UUCP (Rick Wilhelm) writes:
>
> When I run ps(1) I get the following results
>
> $ ps
> ps: unlink() failed
> ps: /etc/ps_data, Permission denied
> ps: Please notify your System Administrator
> PID TTY TIME COMMAND
> 6237 pts010 0:00 ksh
> 6825 pts010 0:10 ps
> $
>
> This problem happens sporadically, with no _apparent_ causes.
> Anyone have any ideas? I RTFM but to no avail.
>
> System: AT&T 6386 WGS running System V/386 Release 3.2
> with KornShell Version 06/03/86a 386 Release 1.1
>
> Thanks,
>
> rick
> --
The problem is actually very simple, the cause as to why this
ever happens is unknown to me. Anyway, the easy stuff first.
$ ls -ld /etc
drwxrwxr-x 16 root sys 2736 Nov 10 14:51 /etc
$
$ ls -l /bin/ps
-r-xr-sr-x 1 bin sys 21788 Nov 14 1988 /bin/ps
As you can see, ps has setgid to sys. It tries to unlink a
file called /etc/ps_data which requires write permission on
/etc. /etc has write permission for its group. This is when
all is well.
Now when the problem you describe happens, if you take a look
at /etc's permissions, you will notice that the group ownership
of /etc changes from sys to bin, like below:
drwxrwxr-x 16 root bin 2736 Nov 10 14:51 /etc
In this case ps cannot write in /etc and you get this error.
What I would like to know from any wizard out there, what causes
the group ownership to change on /etc. I have this problem
once in a while on AT&T 3B2 machines running UNIX System V Rel 3.2.
=======================================================================
Amit Chatterjee (201) 271-1130
AT&T CSIL {major gateway}!tarpon!amit
Somerset, NJ amit at tarpon.att.com
=======================================================================
More information about the Comp.unix.questions
mailing list