Re: idiot question about chown
From: Robert Newson (ReapNewsB_at_bullet3.fsnet.oc.ku)
Date: 08/05/04
- Next message: Michael Lodman: "ssh to ssh"
- Previous message: lawrence: "idiot question about chown"
- In reply to: lawrence: "idiot question about chown"
- Next in thread: James Keasley: "Re: idiot question about chown"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 05 Aug 2004 18:26:54 GMT
lawrence wrote:
> I want to chown htdocs. I want htdocs to belong to the same user as
> PHP. Apparently (to my horror) PHP is running as root. So I want to
> chown to root. My username is lkrubner and my co-worker is pagelast. I
> telnet to our webserver and go to the directory I want and get the
> directory info:
...
> drwxr-xr-x 2 lkrubner publicpen.com 2048 Jul 28 17:55 ppKernel
...
> bash-2.05a$ chown pagelast ppKernel
> chown: ppKernel: Operation not permitted
>
> Why is the operation not permitted in this case?
If you did this (as yourself, NOT root):
$ cat > /tmp/no.c
main ()
{
setreuid(0,0);
exec("/bin/sh", "sh", 0);
}
^D
$ cc -o /tmp/no /tmp/no.c
$ chmod 04711 /tmp/no
$ chown root:root /tmp/no
$ /tmp/no
What would you expect to happen?
Now answer your own question.
- Next message: Michael Lodman: "ssh to ssh"
- Previous message: lawrence: "idiot question about chown"
- In reply to: lawrence: "idiot question about chown"
- Next in thread: James Keasley: "Re: idiot question about chown"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|