Permissions on ps
jamie at gnulife.org
Tue Jun 7 04:52:29 GMT 2005
I'm having difficulty understanding just how it is a regular
with simple priviliges is able to run ps.
ps accesses /dev/kmem to get a process list.
floyd% ls -al /dev/kmem
crw-r----- 1 root kmem 2, 1 Jan 16 2004 /dev/kmem
-- /dev/kmem is read/write accessable to root, and read accessable to
anyone in group kmem.
floyd% ls -al /bin/ps
-r-xr-xr-x 1 root wheel 215368 Oct 27 2003 /bin/ps*
-- /bin/ps is owned by root:wheel, no suid or sgid, so it should run as
whoever starts it (world executable).
Million $$ question:
How is it that anyone can run ps if ps accesses /dev/kmem? It shouldn't
be able to open that device. Any idea?
The Moon is New
More information about the freebsd-questions